Exchange a code, or refresh an access token

Called from your backend, never the browser — it requires your client secret.

grant_type=authorization_code exchanges the single-use code from the callback, along with the code_verifier matching the challenge you sent to /oauth/authorize.

grant_type=refresh_token trades a refresh token for a new access token. Refresh tokens rotate: the response carries a new one and the old value stops working immediately. Presenting a refresh token that has already been used is treated as a leaked credential — Friday revokes the entire connection and the customer must reauthorize. Refresh from one place in your code, not from several workers at once.

Client credentials go in the body as client_id / client_secret, or in an HTTP Basic Authorization header.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Form Data
string
enum
required
Allowed:
string

Authorization code. Required for authorization_code.

string

The same redirect URI used on the authorize request. Required for authorization_code.

string

The PKCE verifier. Required for authorization_code.

string

Required for refresh_token.

uuid
string
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json