Skip to content

Exchange

POST
/api/oauth/exchange
curl --request POST \
--url http://localhost:8080/api/oauth/exchange \
--header 'Content-Type: application/json' \
--data '{ "code": "example" }'

Trade the one-time code for an access token — only in the browser that started sign-in.

Media typeapplication/json
ExchangeIn
object
code
required
Code
string
Examplegenerated
{
"code": "example"
}

Successful Response

Media typeapplication/json
Examplegenerated
example

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}