:doc:`CognitoIdentity <../../cognito-identity>` / Client / get_id

******
get_id
******



.. py:method:: CognitoIdentity.Client.get_id(**kwargs)

  

  Generates (or retrieves) IdentityID. Supplying multiple logins will create an implicit linked account.

   

  This is a public API. You do not need any credentials to call this API.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cognito-identity-2014-06-30/GetId>`_  


  **Request Syntax**
  ::

    response = client.get_id(
        AccountId='string',
        IdentityPoolId='string',
        Logins={
            'string': 'string'
        }
    )
    
  :type AccountId: string
  :param AccountId: 

    A standard Amazon Web Services account ID (9+ digits).

    

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

    An identity pool ID in the format REGION:GUID.

    

  
  :type Logins: dict
  :param Logins: 

    A set of optional name-value pairs that map provider names to provider tokens. The available provider names for ``Logins`` are as follows:

     

    
    * Facebook: ``graph.facebook.com``
     
    * Amazon Cognito user pool: ``cognito-idp.<region>.amazonaws.com/<YOUR_USER_POOL_ID>``, for example, ``cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789``.
     
    * Google: ``accounts.google.com``
     
    * Amazon: ``www.amazon.com``
     
    * Twitter: ``api.twitter.com``
     
    * Digits: ``www.digits.com``
    

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

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

    

    - *(dict) --* 

      Returned in response to a GetId request.

      
      

      - **IdentityId** *(string) --* 

        A unique identifier in the format REGION:GUID.

        
  
  **Exceptions**
  
  *   :py:class:`CognitoIdentity.Client.exceptions.InvalidParameterException`

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

  
  *   :py:class:`CognitoIdentity.Client.exceptions.NotAuthorizedException`

  
  *   :py:class:`CognitoIdentity.Client.exceptions.ResourceConflictException`

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

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

  
  *   :py:class:`CognitoIdentity.Client.exceptions.LimitExceededException`

  
  *   :py:class:`CognitoIdentity.Client.exceptions.ExternalServiceException`

  