:doc:`AmplifyBackend <../../amplifybackend>` / Client / get_token

*********
get_token
*********



.. py:method:: AmplifyBackend.Client.get_token(**kwargs)

  

  Gets the challenge token based on the given appId and sessionId.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/amplifybackend-2020-08-11/GetToken>`_  


  **Request Syntax**
  ::

    response = client.get_token(
        AppId='string',
        SessionId='string'
    )
    
  :type AppId: string
  :param AppId: **[REQUIRED]** 

    The app ID.

    

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

    The session ID.

    

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

    
    ::

      {
          'AppId': 'string',
          'ChallengeCode': 'string',
          'SessionId': 'string',
          'Ttl': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      200 response

      
      

      - **AppId** *(string) --* 

        The app ID.

        
      

      - **ChallengeCode** *(string) --* 

        The one-time challenge code for authenticating into the Amplify Admin UI.

        
      

      - **SessionId** *(string) --* 

        A unique ID provided when creating a new challenge token.

        
      

      - **Ttl** *(string) --* 

        The expiry time for the one-time generated token code.

        
  
  **Exceptions**
  
  *   :py:class:`AmplifyBackend.Client.exceptions.NotFoundException`

  
  *   :py:class:`AmplifyBackend.Client.exceptions.GatewayTimeoutException`

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

  
  *   :py:class:`AmplifyBackend.Client.exceptions.BadRequestException`

  