Oauth Token Exchange
POST/users/v1/oauth/token
Exchange an authorization_code from the /users/v1/oauth/response/{platform} endpoint for an access token and refresh token.
Request
Header Parameters
Possible values: <= 32 characters
IP Address hint
- application/json
Body
required
Possible values: [authorization_code]
Supported grant types for OAuth Token Exchange process
Possible values: non-empty
authorization_code for the OAuth exchange.
If true, the user has accepted the EULA.
If true, the user has accepted the TOS.
If true, the user has accepted the Privacy Policy.
Responses
- 200
- 403
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
Access token for the user.
Refresh token for the user.
If true, the user must accept the EULA before a token can be generated.
If true, the user must accept the TOS before a token can be generated.
If true, the user must accept the Privacy Policy before a token can be generated.
If present, a new code was generated and can be used after the user accepts the required agreements.
Error message if an error occurred.
{
"access_token": "string",
"refresh_token": "string",
"needs_eula": false,
"needs_tos": false,
"needs_privacy_policy": false,
"regenerated_code": "string",
"error_message": "string"
}
Error Codes:
-
authorization_code_not_found: Authorization code not found or expired
- application/json
- Schema
- Example (from schema)
Schema
Default value: true
{
"auth_success": true,
"error_code": "string",
"desc": "string"
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}