Skip to main content

OAuthProtocolError

Error body of the OAuth protocol endpoints — /oauth/token, /oauth/revoke and /oauth/register. These are read by standard OAuth clients, which understand only the RFC 6749 §5.2 / RFC 7591 §3.2.2 shape, so they are not wrapped in ResponseData. Responses carry Cache-Control: no-store and Pragma: no-cache.

errorstring

The RFC error code. One of invalid_request, invalid_client, invalid_grant, invalid_scope, unsupported_grant_type, invalid_redirect_uri, invalid_client_metadata.

Example: invalid_grant
error_descriptionstring

Human-readable explanation, in Uzbek.

Example: Authorization code yoki refresh token yaroqsiz!
message_codeint32

Non-standard addition — the same numeric code as error.messageCode in the standard envelope, so integrations that already branch on it keep working.

Example: 6906
OAuthProtocolError
{
"error": "invalid_grant",
"error_description": "Authorization code yoki refresh token yaroqsiz!",
"message_code": 6906
}