tencent cloud

All product documents
Customer Identity and Access Management
Revoke Token
Last updated: 2023-12-22 11:43:32
Revoke Token
Last updated: 2023-12-22 11:43:32

API Description

This API is used to revoke the OAuth 2.0 Token. If an access_token is passed, only the access_token will be revoked. If a refresh_token is passed, both the refresh_token and its associated access_token will be revoked.

Supported Applications

Web applications, single-page applications (SPA), mobile applications, and machine-to-machine (M2M) applications.

Request Method

POST

Request Path

/oauth2/revoke

Request Content-Type

application/x-www-form-urlencoded

Sample Requests

POST /oauth2/revoke HTTP/1.1
Host: sample.portal.tencentciam.com
Content-Type: application/x-www-form-urlencoded

client_id=TENANT_CLIENT_ID&client_secret=TENANT_CLIENT_SECRET&token=MOCK_ACCESS_TOKEN

Request Parameters

Parameter
Optional
Description
client_id
false
The client_id of the application. This should be the same as the one used for getting the authorization code and Token.
client_secret
false
The client_secret of the application. It can be viewed on the basic information page of the application on the Customer Identity Access Management (CIAM) console.
token
false
The value of access_token or refresh_token.

Sample Success Responses

HTTP/1.1 200 OK

Sample Error Responses

The client_id is not the same as the one used for initiating login and getting the Token.
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=UTF-8

{
"error" : "invalid_client"
}

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon