/oauth/revoke
endpoint/api/v2/device-credentials
endpointPOST
request to https://{yourDomain}/oauth/revoke
.
The /oauth/revoke
endpoint revokes the entire grant, not just a specific token. Use the /api/v2/device-credentials
endpoint to revoke refresh tokens. The API first validates the application credentials and then verifies whether the token was issued to the application making the revocation request. If this validation fails, the request is refused, and the application is informed of the error. Next, the API invalidates the token. The invalidation takes place immediately, and the token cannot be used again after the revocation. Each revocation request invalidates all the tokens that have been issued for the same authorization grant.
Attribute | Description |
---|---|
client_id Required | Your application’s Client ID. The application should match the one the Refresh Token was issued for. |
client_secret | Your application’s Client Secret. Required for confidential applications. |
token Required | The Refresh Token you want to revoke. |
/oauth/revoke
endpoint supports access without the client secret. However, the application itself must have the property tokenEndpointAuthMethod
set to none
. You can change the tokenEndpointAuthMethod
value, either from the Dashboard > Applications > Applications, or using the Management API.
If the request is valid, the refresh token is revoked, and the response is HTTP 200
, with an empty response body. Otherwise, the response body contains the error code and description.
HTTP Status | Description |
---|---|
200 | The Refresh Token is revoked, does not exist, or was not issued to the application making the revocation request. The response body is empty. |
400 | The required parameters were not sent in the request (“error”: “invalid_request” ). |
401 | The request is not authorized (“error”: “invalid_client” ). Check that the application credentials (client_id and client_secret ) are present in the request and hold valid values. |
id
of the refresh token you wish to revoke. To obtain a list of existing refresh tokens, call the /api/v2/device-credentials
endpoint, specifying type=refresh_token
and user_id
with an access token containing read:device_credentials
scope. To narrow the results, you can also specify the client_id
associated with the token (if known).
/api/v2/device-credentials
endpoint with an access token containing delete:device_credentials
scope and the value of ID obtained above:
HTTP 204: The credential no longer exists.
/oauth/revoke
endpoint to revoke a refresh token. This endpoint does not delete the underlying grant. You can change this behavior to also delete the underlying grant in the Dashboard: Dashboard > Tenant Settings > Advanced. Scroll to Settings and enable the Refresh Token Revocation Deletes Grant toggle./api/v2/device-credentials
endpoint to revoke refresh tokens configured for rotation.