Skip to content

Revoke a token

Request

OAuth 2.0 token revocation (RFC 7009). Revokes an access token or a refresh token; revoking a refresh token revokes its whole token family. The endpoint returns 200 even when the token is already invalid, as required by the RFC.

Confidential clients authenticate with HTTP Basic (client_secret_basic); public clients send their client_id in the form body. A client revokes only its own tokens: a token of another client is left untouched and still answers 200.

Bodyapplication/x-www-form-urlencodedrequired
tokenstringrequired

The access or refresh token to revoke.

token_type_hintstring

Optional RFC 7009 hint. Accepted and ignored: the token prefix (ag_at_, ag_rt_) defines the type.

Enum:"access_token""refresh_token"
client_idstring

Required for public clients. Confidential clients send it in HTTP Basic and omit this field.

curl -i -X POST \
  https://developer.alteg.io/_mock/en/b2b-v3/openapi/oauth/revoke \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode token=ag_rt_5b8e2d4f68a1c9e0b2d4f68a \
  --data-urlencode client_id=ag_client_9079b3b06d7d9535

Responses

The token has been revoked (or was already invalid).

Response
No content