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

**************************
merge_developer_identities
**************************



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

  

  Merges two users having different ``IdentityId``s, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user ( ``SourceUserIdentifier``) with the ``IdentityId`` of the ``DestinationUserIdentifier``. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.

   

  The number of linked logins is limited to 20. So, the number of linked logins for the source user, ``SourceUserIdentifier``, and the destination user, ``DestinationUserIdentifier``, together should not be larger than 20. Otherwise, an exception will be thrown.

   

  You must use Amazon Web Services developer credentials to call this operation.

  

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


  **Request Syntax**
  ::

    response = client.merge_developer_identities(
        SourceUserIdentifier='string',
        DestinationUserIdentifier='string',
        DeveloperProviderName='string',
        IdentityPoolId='string'
    )
    
  :type SourceUserIdentifier: string
  :param SourceUserIdentifier: **[REQUIRED]** 

    User identifier for the source user. The value should be a ``DeveloperUserIdentifier``.

    

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

    User identifier for the destination user. The value should be a ``DeveloperUserIdentifier``.

    

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

    The "domain" by which Cognito will refer to your users. This is a (pseudo) domain name that you provide while creating an identity pool. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the ``DeveloperProviderName``, you can use letters as well as period (.), underscore (_), and dash (-).

    

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

    An identity pool ID in the format REGION:GUID.

    

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

    
    ::

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

    

    - *(dict) --* 

      Returned in response to a successful ``MergeDeveloperIdentities`` action.

      
      

      - **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`

  