Visual RFC.
ALL RFCs / RFC 6749
Read the RFC ↗
RFC 6749 / THE FRAMEWORK

Token responses and failures

08

A successful token response describes the credential. An error response must not be mistaken for one.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

DIAGRAM§ 5 ↗
RFC 6749 · § 5EXAMPLE
3 / 3
Token responses and failuresA successful token response describes the credential. An error response must not be mistaken for one. Current state: Return a defined error instead..Token responses and failurestoken requestsuccessaccess_token / token_typeCache-Control: no-storealternative: errorinvalid_grantSuccess and failure are alternatives, not sequential responses.
03
Return a defined error instead.

A rejected grant must not be processed as a successful authorization.

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
KEY POINT

Parse success and failure deliberately.

  • Success includes access_token and token_type; expires_in is recommended, and scope is returned when it differs from the request.
  • Token responses containing credentials use Cache-Control: no-store and Pragma: no-cache.
  • Errors include invalid_request, invalid_client, invalid_grant, unauthorized_client, unsupported_grant_type, and invalid_scope.
DETAILS

OAuth does not mandate one universal access-token serialization. The token type determines how it is used.

Read the RFC section ↗

Diagrams simplify the RFC. Read the linked sections for complete requirements.

Privacy
All chapters in this RFC
  1. Four roles, one delegation
  2. Public and confidential clients
  3. Two endpoints, two channels
  4. Authorization code grant
  5. Implicit grant: historical behavior
  6. Password grant: now prohibited
  7. Client credentials and extension grants
  8. Token responses and failures
  9. Refresh without another prompt
  10. Scope and protected resources
  11. Native apps and security boundaries

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗