Exchange Installer Token
POST
/api/v3/auth/token
const url = 'https://example.com/api/v3/auth/token';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"example","code_verifier":"example","grant_type":"authorization_code","refresh_token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”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
Example
{ "token_type": "Bearer"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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" } ]}