Skip to main content
POST
Exchange a token

Usage

Clients are public clients. Send client_id in the form body and do not send a client secret. PKCE proves the request comes from the client that started the flow. Use the access token as Authorization: Bearer <access_token> on the public API and the MCP server. If token_type is DPoP, use Authorization: DPoP <access_token> with a DPoP proof header instead. The scoped access token endpoints are the exception and require an API key.

Token lifetimes

Refresh token rotation

Each refresh returns a new refresh token and deletes the one you sent. Store the new refresh token before using it. Sending an old refresh token returns invalid_grant. If several workers share one refresh token, make sure only one of them refreshes it at a time.

Headers

DPoP
string

RFC 9449 DPoP proof JWT, signed with ES256. When present, the issued tokens are bound to the proof key.

Body

application/x-www-form-urlencoded

Authorization code

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

Authorization code from the redirect. Codes are single use.

redirect_uri
string<uri>
required

Must equal the redirect_uri sent to the authorization endpoint.

code_verifier
string
required

PKCE code verifier that produced the code_challenge.

resource
string<uri>

RFC 8707 resource indicator. Required when the authorization code or refresh token was bound to a resource, and must match it.

Response

Tokens issued.

access_token
string
required

Opaque access token. When token_type is Bearer, send it as Authorization: Bearer <token>. When token_type is DPoP, send it as Authorization: DPoP <token> with a DPoP proof header.

Pattern: ^sboa_
refresh_token
string
required

Opaque refresh token. It replaces the refresh token used in this request.

Pattern: ^sbor_
token_type
enum<string>
required

DPoP when the token is bound to a DPoP key, otherwise Bearer.

Available options:
Bearer,
DPoP
expires_in
integer
required

Access token lifetime in seconds.

scope
string
required

Space-separated granted scopes. Currently always empty.