Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

create_token

create_token(**kwargs)

Generates a one-time challenge code to authenticate a user into your Amplify Admin UI.

See also: AWS API Documentation

Request Syntax

response = client.create_token(
    AppId='string'
)
Parameters
AppId (string) --

[REQUIRED]

The app ID.

Return type
dict
Returns
Response Syntax
{
    'AppId': 'string',
    'ChallengeCode': 'string',
    'SessionId': 'string',
    'Ttl': 'string'
}

Response Structure

  • (dict) --

    200 response

    • AppId (string) --

      The app ID.

    • ChallengeCode (string) --

      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

  • AmplifyBackend.Client.exceptions.NotFoundException
  • AmplifyBackend.Client.exceptions.GatewayTimeoutException
  • AmplifyBackend.Client.exceptions.TooManyRequestsException
  • AmplifyBackend.Client.exceptions.BadRequestException