Skip to content

Exchange Installer Token

POST
/api/v3/auth/token
curl --request POST \
--url https://example.com/api/v3/auth/token \
--header 'Content-Type: application/json' \
--data '{ "code": "example", "code_verifier": "example", "grant_type": "authorization_code", "refresh_token": "example" }'

Exchange an authorization code or rotate a CLI refresh token.

Media typeapplication/json
InstallerTokenExchange
object
code
Any of:
string
>= 1 characters
code_verifier
Any of:
string
>= 1 characters <= 256 characters
grant_type
Grant Type
string
default: authorization_code
Allowed values: authorization_code refresh_token
refresh_token
Any of:
string
>= 1 characters

Successful Response

Media typeapplication/json
InstallerTokenResponse
object
access_token
required
Access Token
string
expires_at
required
Expires At
string format: date-time
refresh_token
required
Refresh Token
string
scopes
required
Scopes
Array<string>
token_type
Token Type
string
default: Bearer
Allowed value: Bearer
Example
{
"token_type": "Bearer"
}

Validation Error

Media typeapplication/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
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}