OAuth Provider
Exchange authorization code for tokens
OAuth 2.0 Token Endpoint (RFC 6749 Section 4.1.3).
Exchanges an authorization code, client credentials, or refresh token for access tokens.
Grant Types:
- authorization_code: Exchange auth code for tokens (user-based)
- client_credentials: Get tokens for machine-to-machine auth
- refresh_token: Get new access token using refresh token
For client_credentials, access tokens represent the OAuth app creator (the user who registered the client). The JWT may encode userId === client_id; the Node API gateway resolves the creator (createdBy claim or OAuth app lookup) — see OAuth Provider tag.
Client Authentication: Can be provided via:
- HTTP Basic auth: Authorization: Basic base64(client_id:client_secret)
- Request body: client_id and client_secret parameters
PKCE Verification: If authorization used PKCE, the code_verifier must be provided and will be verified against the stored code challenge.
post/oauth2/token
Request body
Response
Tokens issued successfully
Example response
{
"token_type": "Bearer",
"expires_in": 3600
}