API Referenceauth
Exchange code for tokens
Exchange an authorization code for access and refresh tokens. Called after user completes authentication at the identity provider.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X post "http://localhost:8000/api/v1/auth/token" \ -H "Content-Type: application/json" \ -d '{ "code": "auth_code_from_callback", "redirect_uri": "https://app.example.com/callback" }'{
"access_token": "string",
"token_type": "Bearer",
"expires_in": 0,
"refresh_token": "string",
"id_token": "string",
"scope": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
