---
updatedAt: 2026-03-01T18:04:07.000Z
---

# Revoke a token

```shell Shell
hostname="https://v1.api.us.janrain.com"
customerId="e0a70b4f-1eef-4856-bcdb-f050fee66aae"

curl -L -X POST "$hostname/$customerId/login/token/revoke" \
--data-urlencode 'token=sg1JcDKZlTGiiyt9oxJk7AB_fs-zRlQzyLhpZZy-agNzEGTFuxMG3CtzeJ9PeHvZ' \
--data-urlencode 'client_id=a123ef65-83dc-4094-a09a-76e1bec424e7'
```

```node Node
const hostname="https://v1.api.us.janrain.com"
const customerId="e0a70b4f-1eef-4856-bcdb-f050fee66aae"

var request = require('request');
var options = {
  'method': 'POST',
  'url': hostname.concat("/", customerId, "/login/token/revoke"),
  'headers': {
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  form: {
    'token': 'sg1JcDKZlTGiiyt9oxJk7AB_fs-zRlQzyLhpZZy-agNzEGTFuxMG3CtzeJ9PeHvZ',
    'client_id': 'a123ef65-83dc-4094-a09a-76e1bec424e7'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

```

```python Python
hostname="https://v1.api.us.janrain.com"
customerId="e0a70b4f-1eef-4856-bcdb-f050fee66aae"

import requests

url = hostname + "/" + customerId + "/login/token/revoke"

payload='token=sg1JcDKZlTGiiyt9oxJk7AB_fs-zRlQzyLhpZZy-agNzEGTFuxMG3CtzeJ9PeHvZ\
&client_id=a123ef65-83dc-4094-a09a-76e1bec424e7'
headers = {
  'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

```json Response Example
The token was revoked successfully or the token was invalid.
```

# Get your Identity Cloud hostname

<!-- shell@1 -->
<!-- node@1 -->
<!-- python@1 -->

Unless you have a custom domain, US organizations typically use the hostname **https<span>://v1.</span>api.us.janrain.com** Organizations outside the US should replace the **us** with their locale.

# Get your Akamai customer ID

<!-- shell@2 -->
<!-- node@2 -->
<!-- python@2 -->

Unique identifier issued to Akamai customers. To verify your custom ID, log on to Console and, on the **Manage Application** page, check the value of the **customer_id** setting.

# Provide the token being revoked

<!-- shell@5 -->
<!-- node@12 -->
<!-- python@8 -->

Value of the access token or refresh token being revoked.

# Configure the OIDC login client

<!-- shell@6 -->
<!-- node@13 -->
<!-- python@9 -->

Unique identifier of the OpenID Connect client involved in obtaining the token. This ID needs to be the same client ID specified in the original authorization request.

# Call the API

<!-- shell@4 -->
<!-- node@16-19 -->
<!-- python@14 -->

Use the POST method to invalidate the token.

# Review the response



If the API call is successful, the API response consists of the message **The token was revoked successfully or the token was invalid.**