OAuth
Exchange a token
Exchanges an authorization code or a refresh token for a new access token and refresh token. Supports the authorization_code (with PKCE) and refresh_token grant types.
POST
Exchange a token
Usage
Clients are public clients. Sendclient_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 returnsinvalid_grant. If several workers share one refresh token, make sure only one of them refreshes it at a time.Headers
Body
application/x-www-form-urlencoded
- Option 1
- Option 2
Authorization code
Response
Tokens issued.

