Skip to content

Token revocation (RFC 7009).

POST
/oauth/revoke
curl --request POST \
--url https://example.com/api/auth/oauth/revoke \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data token=example \
--data token_type_hint=example \
--data client_id=example \
--data client_secret=example

A refresh token issued to the client ends its grant. Any other token, unknown, expired, another client’s or an access token, is answered 200 all the same; access tokens expire on their own within 15 minutes. The client authenticates as at /oauth/token. Limited per client IP, together with /oauth/token.

Media typeapplication/x-www-form-urlencoded
object
token
required
string
token_type_hint
string
client_id
string
client_secret
string

Example generated

token=example&token_type_hint=example&client_id=example&client_secret=example

Revoked, or nothing to revoke.

The request was refused (RFC 6749 §5.2).

Media typeapplication/json

An RFC 6749 §5.2 error response.

object
error
required
string
Allowed values: invalid_request invalid_client invalid_grant unauthorized_client unsupported_grant_type invalid_scope
error_description
string

Example

{
"error": "invalid_request"
}
Cache-Control
string
Allowed value: no-store

Client authentication failed, error invalid_client.

Media typeapplication/json

An RFC 6749 §5.2 error response.

object
error
required
string
Allowed values: invalid_request invalid_client invalid_grant unauthorized_client unsupported_grant_type invalid_scope
error_description
string

Example

{
"error": "invalid_request"
}
WWW-Authenticate
string
Cache-Control
string
Allowed value: no-store

The body is larger than 64 KiB.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
errors
object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}

This client IP is sending too many requests.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
errors
object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}
Retry-After
integer

Seconds to wait.

The service failed; the problem says nothing more.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
errors
object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}