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.

RFC 6749 · § 5EXAMPLE
3 / 3
03
Return a defined error instead.

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

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.

Key idea: Parse success and failure deliberately.

Terms

Look up a term in the glossary ↗

Rules & examples
  • 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.

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

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A key is different from permission.

An app, a person, and a server have different roles. Follow who asks, who grants permission, and who checks the credential. A key in the drawing is an analogy, not a literal protocol field.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

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

All chapters in RFC 6749

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 ↗