Skip to content

CreateOAuth2TokenRequestBody

Structure Class

CreateOAuth2TokenRequestBody dataclass

Bases: _SerdeShape

The request body for creating an OAuth 2.0 token. Supports both the authorization code and refresh token flows, selected by the "grant_type" parameter.

Attributes

client_id instance-attribute
client_id: str

The OAuth 2.0 client identifier. Expected values: "arn:aws:signin:::devtools/same-device" or "arn:aws:signin:::devtools/cross-device".

code class-attribute instance-attribute
code: str | None = ...

The authorization code received from the "/v1/authorize" endpoint. Required when "grant_type=authorization_code".

code_verifier class-attribute instance-attribute
code_verifier: str | None = ...

The PKCE code verifier that proves possession of the original code challenge. Required when "grant_type=authorization_code".

grant_type instance-attribute
grant_type: str

The OAuth 2.0 grant type. Supported values: - "authorization_code" - Exchange an authorization code for tokens. - "refresh_token" - Use a refresh token to obtain a new access token.

redirect_uri class-attribute instance-attribute
redirect_uri: str | None = ...

The redirect URI that was used in the original authorization request. Must match exactly. Required when "grant_type=authorization_code".

refresh_token class-attribute instance-attribute
refresh_token: str | None = ...

The refresh token issued by a previous token response. Required when "grant_type=refresh_token".