register_device(**kwargs)¶Registers a device to receive push sync notifications.
This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.register_device(
IdentityPoolId='string',
IdentityId='string',
Platform='APNS'|'APNS_SANDBOX'|'GCM'|'ADM',
Token='string'
)
[REQUIRED]
A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. Here, the ID of the pool that the identity belongs to.
[REQUIRED]
The unique ID for this identity.
[REQUIRED]
The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).
[REQUIRED]
The push token.
dict
Response Syntax
{
'DeviceId': 'string'
}
Response Structure
(dict) --
Response to a RegisterDevice request.
DeviceId (string) --
The unique ID generated for this device by Cognito.
Exceptions
CognitoSync.Client.exceptions.NotAuthorizedExceptionCognitoSync.Client.exceptions.InvalidParameterExceptionCognitoSync.Client.exceptions.ResourceNotFoundExceptionCognitoSync.Client.exceptions.InternalErrorExceptionCognitoSync.Client.exceptions.InvalidConfigurationExceptionCognitoSync.Client.exceptions.TooManyRequestsException