Exchange a code, refresh token, or subject token for an access token
Changed onImplements the RFC 6749 §5.1/§5.2 token-endpoint body contract in * both directions: a successful exchange returns a flat JSON object with * access_token at the top level, and a failure returns a flat * {error, error_description} object — neither is wrapped in this API's * usual response envelope, since no standard OAuth client library (or MCP * connector) would find access_token or error inside a data key. * * The third grant, urn:ietf:params:oauth:grant-type:token-exchange (RFC 8693), * is restricted to a confidential internal-service client (see /oauth/introspect) * and trades a front-end resource's access token (the subject_token) for one * minted for THIS API — the crossing an MCP server makes after a user consents, * since its own token can never be forwarded here directly. The issued token is * never wider than the subject: scope, when sent, must be a subset of the * subject's own scopes, and resource must equal this API's own resource * identifier exactly. No refresh token is issued; the caller re-exchanges from * the user's own token instead of holding unattended API access.
Request
- Base URLhttps://api.assinafy.com.br
- URLhttps://api.assinafy.com.br/v1/oauth/token
- Authnone required
Request body
Response
The token response
Example response
{
"issued_token_type": "urn:ietf:params:oauth:token-type:access_token",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "documents:read"
}Changes
- info
added the non-success response with the status
- info
- info
added the media type
application/x-www-form-urlencodedto the request body
- info