Skip to content

/AWS1/CL_CGS=>REGISTERDEVICE()

About RegisterDevice

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.

RegisterDevice The following examples have been edited for readability. POST / HTTP/1.1 CONTENT-TYPE: application/json X-AMZN-REQUESTID: 368f9200-3eca-449e-93b3-7b9c08d8e185 X-AMZ-TARGET: com.amazonaws.cognito.sync.model.AWSCognitoSyncService.RegisterDevice HOST: cognito-sync.us-east-1.amazonaws.com X-AMZ-DATE: 20141004T194643Z X-AMZ-SECURITY-TOKEN: AUTHORIZATION: AWS4-HMAC-SHA256 Credential=, SignedHeaders=content-type;content-length;host;x-amz-date;x-amz-target, Signature=

{ "Operation": "com.amazonaws.cognito.sync.model#RegisterDevice", "Service": "com.amazonaws.cognito.sync.model#AWSCognitoSyncService", "Input": { "IdentityPoolId": "ID_POOL_ID", "IdentityId": "IDENTITY_ID", "Platform": "GCM", "Token": "PUSH_TOKEN" } } 1.1 200 OK x-amzn-requestid: 368f9200-3eca-449e-93b3-7b9c08d8e185 date: Sat, 04 Oct 2014 19:46:44 GMT content-type: application/json content-length: 145

{ "Output": { "__type": "com.amazonaws.cognito.sync.model#RegisterDeviceResponse", "DeviceId": "5cd28fbe-dd83-47ab-9f83-19093a5fb014" }, "Version": "1.0" }

Method Signature

IMPORTING

Required arguments:

IV_IDENTITYPOOLID TYPE /AWS1/CGSIDENTITYPOOLID /AWS1/CGSIDENTITYPOOLID

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.

IV_IDENTITYID TYPE /AWS1/CGSIDENTITYID /AWS1/CGSIDENTITYID

The unique ID for this identity.

IV_PLATFORM TYPE /AWS1/CGSPLATFORM /AWS1/CGSPLATFORM

The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).

IV_TOKEN TYPE /AWS1/CGSPUSHTOKEN /AWS1/CGSPUSHTOKEN

The push token.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_CGSREGDEVICERESPONSE /AWS1/CL_CGSREGDEVICERESPONSE