Revoke Data Cloud Access Tokens

Revoke a Data Cloud access token to remove client access to Salesforce Data Cloud data.

Required Editions

Available in: All Editions

Use the /revoke endpoint to invalidate a previously issued Data Cloud access token. This API endpoint uses a POST request to revoke the token. The request body must include the token you want to revoke as a required parameter named token.

Endpoint URL


https://{datacloud_instance_url}/services/a360/revoke

Request Headers

  • Authorization: A valid Data Cloud Token. This can be the token you are revokeing or another authorized token.
  • Content-Type: Must be 'application/x-www-form-urlencoded.

Request Body

  • token: A string identifying the token to be revoked.

Example curl Request

This curl command shows and example of how to revoke a Data Cloud access token:


curl -X POST "https://{datacloud_instance_url}/services/a360/revoke" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer {valid_token}" \
-d "token={datacloud_access_token_to_revoke}"
   

Response Codes

The API returns a response code to indicate the result of the request. It returns the response body in application/json format.

Status code Description Example
200 OK The token was successfully revoked or was invalid. This response is returned even if the token was unknown to the server. "Token revoked successfully"
400 Bad Request The request was malformed or invalid. The API returns an error description, such as a missing token parameter.
{
 "error": "invalid_request", 
"error_description": "The provided token is malformed or improperly encoded."
 } 
401 Unauthorized The authenticated client is not authorized to revoke the token.
{ 
"error": "unauthorized_client", 
"error_description": "The authenticated client is not authorized to revoke the token"
 } 
503 Service Unavailable The server is temporarily unable to handle the request. Try again later.
{ 
"error": "service_unavailable", 
"error_description": "The service is temporarily unavailable. Please retry later."
 }