Revoke Refresh Token

post

/oauth2/v1/revoke

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : schema
Type: object
Show Source
  • Refresh Token
    Example: eyJ4NXQiOiI4Wk5NMEFfNWFuSTc0dGp3Y3FWcWtMN3Z0Q2ciLCJraWQiOiJwcml2YWVrZXkxIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1YzA4NDcyMi03Njk3LTQ2NzgtOWVmNC01ZDMxYjg5MjgzYTMiLCJhdWQiOiI1YzA4NDcyMi03Njk3LTQ2NzgtOWVmNC01ZDMxYjg5MjgzYTMiLCJuYmYiOjE0NDA3NTk0MDgsInNjb3BlIjoiQUNNRUNhbmRpZGF0ZVByb2ZpbGVTZXJ2aWNlLnJlc3VtZXNfbW9udGhzIG9mZmxpbmVfYWNjZXNzIiwiaXNzIjoiaWRjcy5vcmFjbGUuY29tIiwiZXhwIjoxNDQwOTc1NDA4LCJpYXQiOjE0NDA3NTk0MDgsInRlbmFudCI6IlRFTkFOVDEiLCJqdGkiOiIwNGQwZDcyYi1iMDZmLTQ5YzItOGZkZi00ZjliYTllOTMxNGYifQ.AQfGzQ9Qe6RgQqwr_V1z2Nl3N7NG5qsy-lMNIMto8xvKAxyQcEVQ_IN6dPZZtJ90uNr8Y1eavtGmaFIcY4KVwg
Back to Top

Response

Supported Media Types

200 Response

Refresh Token revoked

400 Response

Invalid request
Body ()
Root Schema : error
Type: object
Error message that appears during Device Code and User Code generation
Show Source

401 Response

Invalid client
Body ()
Root Schema : error
Type: object
Error message that appears during Device Code and User Code generation
Show Source
Back to Top

Examples

The following example shows how to revoke a refresh token by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL. See the Authorization section for more information on grant types.

Example Request Using cURL

Note:

The command in this example uses the URL structure https://tenant-base-url/resource-path, where tenant-base-url represents the Identity Service URL, and the resource path represents the Identity Service API. See Send Requests for the appropriate URL structure to use.

The following shows an example cURL request to revoke a refresh token.

curl -i 
-H 'Authorization: Basic <base64Encoded clientid:secret>'
-H 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8'
--request POST https://tenant-base-url/oauth2/v1/revoke -d 'token=<token-value>'

Example of Response Body

The following example shows the contents of the response body in JSON format:

{
  "status": 200
}

Example of Response Body

The following example shows the contents of the response body in JSON format when a user tries to revoke an access token and the server does not support revoking the access token:

{
  "error": "unsupported_token_type",
  "error_description": "Illegal base64 character 2e"
}
Back to Top