Skip to content

create_o_auth2_token

Operation

create_o_auth2_token

create_o_auth2_token(request: CreateOAuth2TokenInput | CreateOAuth2TokenInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateOAuth2TokenInputDict]) -> CreateOAuth2TokenOutput

Exchanges an authorization code or refresh token for an OAuth 2.0 access token and refresh token.

Parameters:

Name Type Description Default
request CreateOAuth2TokenInput | CreateOAuth2TokenInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateOAuth2TokenInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateOAuth2TokenOutput

An instance of CreateOAuth2TokenOutput.

create_o_auth2_token async

create_o_auth2_token(request: CreateOAuth2TokenInput | CreateOAuth2TokenInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateOAuth2TokenInputDict]) -> CreateOAuth2TokenOutput

Exchanges an authorization code or refresh token for an OAuth 2.0 access token and refresh token.

Parameters:

Name Type Description Default
request CreateOAuth2TokenInput | CreateOAuth2TokenInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateOAuth2TokenInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateOAuth2TokenOutput

An instance of CreateOAuth2TokenOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

CreateOAuth2TokenInputDict

Bases: TypedDict

Dictionary form of CreateOAuth2TokenInput.

Attributes

token_input instance-attribute

Flattened token operation inputs. The "grant_type" in the request body determines the specific operation.

CreateOAuth2TokenInput dataclass

Bases: _SerdeShape

Input structure for CreateOAuth2Token operation Contains flattened token operation inputs for both authorization code and refresh token flows. The operation type is determined by the grant_type parameter in the request body.

Attributes

token_input class-attribute instance-attribute
token_input: CreateOAuth2TokenRequestBody | None = ...

Flattened token operation inputs. The "grant_type" in the request body determines the specific operation.

Output

CreateOAuth2TokenOutput dataclass

Bases: _SerdeShape

Output structure for CreateOAuth2Token operation Contains flattened token operation outputs for both authorization code and refresh token flows. The response content depends on the grant_type from the original request.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

token_output instance-attribute

Flattened token operation outputs. The specific response fields depend on the grant_type used in the request.