Generate OAuth2ProviderConnectionToken
POST/api/users/me/providers/oauth2/token
Generate an OAuth2ProviderConnectionToken that enables the user to connect new OAuth2 providers.
You can learn more about connecting OAuth2 providers to existing accounts here.
Tokens
- A valid
AccessTokenis required. - A valid
StepUpTokenis required. This token should match user and session contained in theAccessToken.
Request
Responses
- 200
- 401
- 500
Returns the token if header authentication is enabled.
The following error codes correspond to this status:
ACCESS_TOKEN_EXPIRED: Indicates that the access token is expired.ACCESS_TOKEN_INVALID: Indicates that the access token cannot be decoded.AUTHENTICATION_REQUIRED: User is not authenticated.STEP_UP_TOKEN_EXPIRED: Indicates that the step-up token is expired.STEP_UP_TOKEN_INVALID: Indicates that the step-up token cannot be decoded.STEP_UP_TOKEN_MISSING: Thrown when the step-up token is missing.
The following error codes correspond to this status:
ACCESS_TOKEN_ALLOWLIST_READING_FAILURE: Represents an exception indicating a failure when reading the allowlist for an access token cache.OAUTH2_PROVIDER_CONNECTION_TOKEN_ENCODING_FAILURE: Represents an exception that occurs during the encoding process of an OAuth2 provider connection token.OAUTH2_PROVIDER_CONNECTION_TOKEN_SECRET_FAILURE: Represents an exception that occurs when there is a failure related to the secret required for creating an OAuth2 provider connection token.COOKIE_CREATION_FAILURE: Thrown when an exception occurred during the creation of a cookie.