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.

exchange_code_for_token

exchange_code_for_token(**kwargs)

Exchanges an access code for a token.

See also: AWS API Documentation

Request Syntax

response = client.exchange_code_for_token(
    provider='figma',
    request={
        'code': 'string',
        'redirectUri': 'string'
    }
)
Parameters
  • provider (string) --

    [REQUIRED]

    The third-party provider for the token. The only valid value is figma .

  • request (dict) --

    [REQUIRED]

    Describes the configuration of the request.

    • code (string) -- [REQUIRED]

      The access code to send in the request.

    • redirectUri (string) -- [REQUIRED]

      The location of the application that will receive the access code.

Return type

dict

Returns

Response Syntax

{
    'accessToken': 'string',
    'expiresIn': 123,
    'refreshToken': 'string'
}

Response Structure

  • (dict) --

    • accessToken (string) --

      The access token.

    • expiresIn (integer) --

      The date and time when the new access token expires.

    • refreshToken (string) --

      The token to use to refresh a previously issued access token that might have expired.

Exceptions

  • AmplifyUIBuilder.Client.exceptions.InvalidParameterException