Skip to main content

Revoke OAuth Token

This request terminates the session of the partner targeted by client ID and client secret.

post /oauth/revoke

Sample​

A sample POST request to terminate an OAuth token, targeted by the partner client ID and the client secret:

curl -X POST \
'https://api.carrierx.com/core/v2/oauth/revoke' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-binary 'client_id=5c7965f285344165b003ce1a3202e589&client_secret=5033909114fe442cbbcb83b674dbf90c' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response​

204 status code with an empty body.

Required Scopes​

To revoke an OAuth token the partner must have one of the following scopes enabled:

  • oauth.manage_all_tokens
  • oauth.manage

Body Arguments​

ParameterData TypeDescription
token
string

The access token that will be revoked. If no token is specified, the token that is used for the authorization in the current request will be revoked.

client_id
required
string

The OAuth client ID, used together with the client secret to authenticate this request. Contact CarrierX support at [email protected] to obtain your client ID and client secret.

client_secret
required
string

The OAuth client secret, used together with the client ID to authenticate this request. Contact CarrierX support at [email protected] to obtain your client ID and client secret.

token_type
string

The token type. Values accepted in this field are access_token and refresh_token.