oauth2.dev

unsupported_grant_type

IETF

Registry Context

`unsupported_grant_type` is an OAuth 2.0 token error code indicating that the authorization server does not support the requested authorization grant type.

Technical Summary

RFC 6749 Section 5.2 defines `unsupported_grant_type` as a token error response value. A token error response requires an `error` parameter containing a single ASCII error code. Section 5.2 also restricts the characters allowed in `error`, while Section 11.4.1 applies the same character restriction to registered error names.

When Used

Used in a token error response when the authorization server does not support the requested authorization grant type.

Normative Requirements

Responses

REQUIRED
1
  1. RFC 6749 - Section 5.2

    include an `error` parameter containing a single ASCII error code.

    error REQUIRED. A single ASCII [USASCII] error code from the following:

OPTIONAL
2
  1. RFC 6749 - Section 5.2

    include an `error_description` parameter containing human-readable ASCII text that assists the client developer in understanding the error.

    error_description OPTIONAL. Human-readable ASCII [USASCII] text providing additional information

  2. RFC 6749 - Section 5.2

    include an `error_uri` parameter identifying a human-readable web page with information about the error.

    error_uri OPTIONAL. A URI identifying a human-readable web page with information about the error

the `error_description` parameter value

MUST NOT
1
  1. RFC 6749 - Section 5.2

    include characters outside the set %x20-21 / %x23-5B / %x5D-7E.

    Condition: when the parameter is included

    Values for the "error_description" parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E.

the `error_uri` parameter value

MUST NOT
1
  1. RFC 6749 - Section 5.2

    include characters outside the set %x21 / %x23-5B / %x5D-7E.

    Condition: when the parameter is included

    MUST NOT include characters outside the set %x21 / %x23-5B / %x5D-7E.

MUST
1
  1. RFC 6749 - Section 5.2

    conform to the URI-reference syntax.

    Condition: when the parameter is included

    Values for the "error_uri" parameter MUST conform to the URI-reference syntax

the `error` parameter value

MUST NOT
1
  1. RFC 6749 - Section 5.2

    include characters outside the set %x20-21 / %x23-5B / %x5D-7E.

    Values for the "error" parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E.

the registered error name

MUST NOT
1
  1. RFC 6749 - Section 11.4.1

    include characters outside the set %x20-21 / %x23-5B / %x5D-7E.

    Values for the error name MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E.

Validation Guidance

error

Ensure every token error response includes an `error` parameter containing a single ASCII error code.

error

Ensure `error` values contain only characters from %x20-21 / %x23-5B / %x5D-7E.

error

Emit `unsupported_grant_type` when the authorization grant type is not supported by the authorization server.

error

Use HTTP 400 for the token error response unless another status code is specified.

error

When present, ensure `error_description` contains only characters from %x20-21 / %x23-5B / %x5D-7E.

error

When present, ensure `error_uri` is a URI-reference and contains only characters from %x21 / %x23-5B / %x5D-7E.

error

Reject a registered error name containing characters outside %x20-21 / %x23-5B / %x5D-7E.

Reference

Details

Entry Id
unsupported_grant_type
Name
unsupported_grant_type
Usage Location
token endpoint
Protocol Extension
OAuth 2.0 Authorization Framework
Change Controller
IETF
Reference
RFC6749