application/x-www-form-urlencoded bodies and authenticate your application with its client ID and secret, either as form fields or as HTTP Basic authentication.
Errors follow RFC 6749: a JSON body with error and an optional error_description.
POST /oauth2/token
Exchanges an authorization code for tokens, or refreshes an access token.Authorization code grant
Refresh token grant
The refresh token from the previous token response. Each refresh token can be used once.
Space-separated subset of the granted scopes to narrow the new access token. Defaults to all granted scopes.
Response fields
New refresh token. Replace the stored one, the previous refresh token is no longer valid.
The project the user granted. Only returned when exchanging an authorization code. Re-fetch anytime with GET /projects.
Example response
Error responses
POST /oauth2/revoke
Revokes an authorization. Pass the refresh token. Every access token issued for the same authorization stops working as well.Response
Always returns200 OK with an empty body, including when the token is unknown or already revoked.