Revoke Token
Revokes the current user's token. After revocation, the token becomes invalid. Note: To avoid leaking sensitive information, the API will uniformly return success when attempting to revoke a token that is already invalid, already revoked, or expired.
# Request Description
POST https://{your_domain}/api/v1/oauth2/revoke
# Request Headers
| Parameter Name | Chinese Name | Required | Example Value | Description |
|---|---|---|---|---|
| Authorization | Authentication Information | Required | Basic UnFCMkhKd4OWWA== | Uses client_id and client_secret for base64 authentication, format: base64(client_id:client_secret) |
| Content-Type | Data Type | Required | application/x-www-form-urlencoded | Submit parameters using form format |
# Request Example
POST https://{your_domain}/api/v1/oauth2/revoke
Authorization: Basic UnFCMkhKdGt6bFU...aT0NObkk4NlNOWk9xWA==
Content-Type: application/x-www-form-urlencoded
token=MmVkMzYmMzODBkYjY3UV4nmxKh4z....&token_type_hint=access_token
# Request Parameters
| Parameter Name | Chinese Name | Required | Example Value | Description |
|---|---|---|---|---|
| token | Token | Yes | ||
| token_type_hint | Optional | Defaults to access_token |
# Return Example
Correct Return Example
HTTP/1.1 200 OK
Error Return Example
HTTP 401 Unauthorized
Content-Type: application/json;charset=UTF-8
{
"error": "invalid_client",
"error_description": "Bad client credentials"
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# Return Parameters
If successful, returns an empty body.
