Creating APNs Tokens (tokens/create)
You can get a token that can be used to long-poll for push notifications from other containers. These tokens are known as Apple Push Notification services (APNs) tokens.
Path
POST [path]/database/[version]/[container]/[environment]/tokens/create
Parameters
- path
The URL to the CloudKit web service, which is
https://api.apple-cloudkit.com
.- version
The protocol version—currently, 1.
- container
A unique identifier for the app’s container. The container ID begins with
iCloud.
.- environment
The version of the app’s container. Pass
development
to use the environment that is not accessible by apps available on the store. Passproduction
to use the environment that is accessible by development apps and apps available on the store.
Request
The POST request is a JSON dictionary containing a single apnsEnvironment
key that specifies the APNs environment. To use the production environment, set the key to "production"
. To use the development environment, set the key to "development"
.
Response
The response dictionary contains the token information with the following keys:
Key |
Description |
---|---|
|
The APNs environment specified in the request. |
|
A token you use to register to receive push notifications from other instances of this app. |
|
The URL to use to long-poll for push notifications. |
Fetching Subscriptions by Identifier (subscriptions/lookup)
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2016-06-13