authentication

OAuth2 Token Endpoint

Changed on

Exchange an authorization code for tokens, or refresh an existing token. Supports grant_type authorization_code and refresh_token.

post/oauth2/token

Request

  • Base URL
    https://{subdomain}.auth.{region}.nhost.run/v1
  • URL
    https://{subdomain}.auth.{region}.nhost.run/v1/oauth2/token
  • Auth
    none declared

Request body application/x-www-form-urlencoded

grant_type'authorization_code' | 'refresh_token' required
codestring nullable
redirect_uristring nullable
client_idstring nullable
client_secretstring nullable
code_verifierstring nullable
refresh_tokenstring nullable
resourcestring nullable

Response

Token response

access_tokenstring required
token_typestring required
expires_ininteger required
refresh_tokenstring
id_tokenstring
scopestring

Changes