Skip to Content
MuoCeon Docs
v1oauth context

Token exchange

POST /v1/oauth/token — three grant types, client authentication methods and response fields.

POST {issuer}/token, with an application/x-www-form-urlencoded body and a Cache-Control: no-store response.

This page covers the contract only; the full parameters and samples for each grant type are in Token exchange and refresh.

Client authentication

MethodApplies toHow
client_secret_basicConfidential clients (recommended)Authorization: Basic base64(client_id:client_secret)
client_secret_postConfidential clientsclient_id and client_secret in the form body
nonePublic clientsOnly client_id in the form body

Grant types

grant_typeScenarioKey parameters
authorization_codeExchange a code after user consentcode, redirect_uri, code_verifier
refresh_tokenRefreshrefresh_token; scope may only narrow
client_credentialsServer-to-server (machine clients)scope

Response

{
  "token_type": "Bearer",
  "expires_in": 3600,
  "access_token": "eyJ...",
  "refresh_token": "eyJ...",
  "scope": "openid profile email offline_access",
  "id_token": "eyJ..."
}
FieldNotes
access_tokenThe access token
refresh_tokenReturned only when the scope includes offline_access
id_tokenReturned when openid was requested
scopeThe scope actually granted, possibly narrowed
expires_in3600 seconds for web_server, 1800 for public-client platforms

Rules

RuleNotes
No cachingThe response always carries no-store
Refresh means rotateThe old refresh token dies immediately; clients must overwrite it
Do not parse the refresh tokenIt is a signed JWT; clients must not depend on its internals
Refresh does not restore authorization detailsauthorization_details only holds for the original authorization
Rate limitedPer IP; over the limit returns 429, not 500

On this page