Skip to content

Oauth Token

POST
/api/oauth/token
curl --request POST \
--url https://example.com/api/oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data client_id=example \
--data client_secret=example \
--data code=example \
--data grant_type=example \
--data redirect_uri=example

OAuth2 Token endpoint.

Exchanges authorization code for access token.

Media type application/x-www-form-urlencoded
Body_oauth_token_api_oauth_token_post
object
client_id
required
Client Id
string
client_secret
required
Client Secret
string
code
Any of:
string
grant_type
required
Grant Type
string
redirect_uri
Any of:
string
Example generated
client_id=example&client_secret=example&code=example&grant_type=example&redirect_uri=example

Successful Response

Media type application/json
Example generated
example

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}