Skip to main content
Exchange a code or refresh a token

Body

application/x-www-form-urlencoded

Each field is sent once. authorization_code needs code, redirect_uri and code_verifier; refresh_token needs refresh_token.

Each field is sent once. authorization_code needs code, redirect_uri and code_verifier; refresh_token needs refresh_token.

client_id
string
required
grant_type
enum<string>
required
Available options:
authorization_code,
refresh_token
code
string

The single-use authorization code.

code_verifier
string

The PKCE verifier: 43 to 128 characters (RFC 7636).

redirect_uri
string

The same redirect_uri the authorization used.

refresh_token
string

The latest refresh token.

resource
string

The URL of the xcale MCP endpoint, when sent.

scope
string

Read and ignored.

Response

The access token, valid for 15 minutes, and a new refresh token. A refresh token is used once: keep the latest.

access_token
string
required

Sent to the MCP endpoint as Authorization: Bearer.

expires_in
integer
required

Seconds: always 900.

refresh_token
string
required
token_type
enum<string>
required
Available options:
Bearer