:doc:`CognitoSync <../../cognito-sync>` / Client / register_device

***************
register_device
***************



.. py:method:: CognitoSync.Client.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 <https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RegisterDevice>`_  


  **Request Syntax**
  ::

    response = client.register_device(
        IdentityPoolId='string',
        IdentityId='string',
        Platform='APNS'|'APNS_SANDBOX'|'GCM'|'ADM',
        Token='string'
    )
    
  :type IdentityPoolId: string
  :param IdentityPoolId: **[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.

    

  
  :type IdentityId: string
  :param IdentityId: **[REQUIRED]** 

    The unique ID for this identity.

    

  
  :type Platform: string
  :param Platform: **[REQUIRED]** 

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

    

  
  :type Token: string
  :param Token: **[REQUIRED]** 

    The push token.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'DeviceId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Response to a RegisterDevice request.

      
      

      - **DeviceId** *(string) --* 

        The unique ID generated for this device by Cognito.

        
  
  **Exceptions**
  
  *   :py:class:`CognitoSync.Client.exceptions.NotAuthorizedException`

  
  *   :py:class:`CognitoSync.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`CognitoSync.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`CognitoSync.Client.exceptions.InternalErrorException`

  
  *   :py:class:`CognitoSync.Client.exceptions.InvalidConfigurationException`

  
  *   :py:class:`CognitoSync.Client.exceptions.TooManyRequestsException`

  