POST
/auth/oauth/revokeRevoke Client Token
RFC 7009 revocation for a token from Redeem Authorization Code.
A form-encoded token=<access token> ends that token's client session at once; the answer is the same 200 for an unknown, expired or another client's token.
A browser call is answered only from a configured client's origin, without credentials.
Request body
| token * | string | The access token to revoke. Its client session ends at once. Example: "eyJhbGciOiJFZERTQSJ9.eyJzdWIiOiJ1c3JfLi4uIn0.c2ln" |
| token_type_hint | "access_token" | Optional; only access tokens exist here. |
| client_id | string | Optional: the client the token was issued to. When given, a token of another client is left alone. Example: "playground" |
Responses
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | The token is no longer usable, or never was. | |
| 404 | K9O_NOT_FOUND | This deployment configures no OAuth clients. |
| 429 | K9O_RATE_LIMITED | Too many revocations from this address; wait and try again. |
Response body (200)
| revoked * | true | Always true (RFC 7009 §2.2): an unknown, expired or another client's token gets the same answer. |
cURL
curl -X POST 'https://<org>.api-<region>.k9o.io/auth/oauth/revoke'Showing example in cURL
Request example
{
"token": "eyJhbGciOiJFZERTQSJ9.eyJzdWIiOiJ1c3JfLi4uIn0.c2ln",
"token_type_hint": "access_token",
"client_id": "playground"
}Response example (200)
{
"revoked": true
}