<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CloudKitJS",
  "identifier" : "/documentation/CloudKitJS/CloudKit.ContainerConfig",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "CloudKit JS"
    ],
    "preciseIdentifier" : "struct/CloudKit.ContainerConfig"
  },
  "title" : "CloudKit.ContainerConfig"
}
-->

# CloudKit.ContainerConfig

A configuration for a container.

```
dictionary CloudKit.ContainerConfig {
	String containerIdentifier;
	String environment;
	String apnsEnvironment;
	Object apiTokenAuth;
	Object serverToServerKeyAuth;
};
```

## Overview

This table describes `apiTokenAuth` properties.

|Property       |Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|`apiToken`     |The API token generated and obtained using CloudKit Dashboard. To create an API token, read [Accessing CloudKit Using an API Token](https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/CloudKitWebServicesReference/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW2) in [CloudKit Web Services Reference](https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/CloudKitWebServicesReference/index.html#//apple_ref/doc/uid/TP40015240).|
|`persist`      |Boolean value indicating whether the CloudKit session token persists. The default value is `false`.                                                                                                                                                                                                                                                                                                                                                                                                                      |
|`signInButton` |The sign-in button to display to the user. The properties are: ![](spacer) id: The DOM element ID. The default value is `apple-sign-in-button`. ![](spacer) theme: The button theme. The default value is `medium`. ![](spacer) If `null`, uses the default property values.                                                                                                                                                                                                                                             |
|`signOutButton`|The sign-out button to display to the user. The properties are: ![](spacer) id: The DOM element ID. The default value is `apple-sign-out-button`. ![](spacer) theme: The button theme. The default value is `medium`. ![](spacer) If `null`, uses the default property values.                                                                                                                                                                                                                                           |

This table describes `serverToServerKeyAuth` properties.

|Property              |Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|`keyID`               |A unique identifier for the key generated using CloudKit Dashboard. To create this key, read [Accessing CloudKit Using a Server-to-Server Key](https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/CloudKitWebServicesReference/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW6) in [CloudKit Web Services Reference](https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/CloudKitWebServicesReference/index.html#//apple_ref/doc/uid/TP40015240).|
|`privateKeyFile`      |The path to the PEM encoded key file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|`privateKeyPassPhrase`|The pass phrase for the key.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)