Oauth_token
realmId*stringRealm ID
Dual encoding per openid-connect.md §5.1: JSON (first-party flow) or RFC 6749 §4.1.3 form-urlencoded (standard OIDC/MCP clients); both deserialize into the same snake_case field names. Grants: authorization_code (all clients), refresh_token (built-in MCP client only)
- body
OAuth 2.0 token request (RFC 6749), grant-discriminated.
Field names use snake_case per OAuth 2.0 specification rather than the
project-wide camelCase convention. authorization_code requires
code/redirect_uri/client_id/code_verifier; refresh_token (MCP only this
round) requires refresh_token/client_id/resource and accepts an optional
scope (absent = inherit, explicit = must equal the original set).
client_id?string|nullcode?string|nullcode_verifier?string|nullgrant_type*stringredirect_uri?string|nullrefresh_token?string|nullresource?|RFC 8707 resource indicator. The MCP authorization_code exchange must repeat the code's resource; the refresh grant requires the bound resource.
scope?|Refresh grant only: absent inherits the original scope set, an explicit value must equal it exactly.
Access token issued
application/json- response
OAuth 2.0 token response (RFC 6749)
access_token*stringexpires_in*integerint640 <= valueid_token?|OIDC identity token (RS256 JWT). Present only when the authorization
request carried the openid scope; omitted otherwise so non-OIDC
responses stay byte-identical.
refresh_expires_in*integerint640 <= valuerefresh_token*stringtoken_type*stringcurl -X POST 'https://example.com/api/oauth/string/token' \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "string"
}'{
"access_token": "string",
"expires_in": 0,
"id_token": "string",
"refresh_expires_in": 0,
"refresh_token": "string",
"token_type": "string"
}