v47

latestOpenAPI 3.0.3MIT Licenseraw.githubusercontent.com2026-08-015915132.9 KB
oauth-server

OAuth 2.1 Token endpoint

Issues access tokens in exchange for authorization codes or refresh tokens. Supports authorization_code and refresh_token grant types. Only available when OAuth server is enabled (set GOTRUE_OAUTH_SERVER_ENABLED=true for self-hosted or enable in Supabase Dashboard).

post/oauth/token

Response

Access token issued successfully

access_tokenstring

The access token

token_typestring

Type of token issued

expires_ininteger

Lifetime in seconds of the access token

refresh_tokenstring

Refresh token (if applicable)

scopestring

Authorized scopes

Example response

{
  "token_type": "Bearer"
}