PUT oauth/admin/token/revoke

Revokes an existing OAuth grant.

You can send the two parameters, client_id and client_secret, either in form parameters or in the Basic authorization header.

New in API Platform Version: 2018.0.0

Authorization Roles/Permissions: Must be an authorized user for the resource.

This topic includes the following sections:

HTTP Method


Back to top



Back to top

Sample Request

The example below shows a request for client information for the OAuth Provider.

Request URL


Sample request headers

Accept: application/json
Cookie: OAuthToken_{OAuthProviderName}

Sample request body

The example below shows the request parameters sent as Authorization headers.

Revoke Token API call

Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/json, application/xml
Content-Type application/x-www-form-urlencoded
OAuthToken_{OAuthProviderName} The OAuth cookie that identifies the logged-in user with the provider. Depending on the operation being used and the context, the authenticated user could be the resource owner, the administrator, the client app administration, or the OAuth Provider. The cookie is returned after logging in with the POST /oauth/login operation.

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
client_id Form String Required

The client ID for the OAuth grant that is being revoked.

You could also send this in a Basic authorization header. See example.

access_token Form String Required

The access token that is being revoked.

You could also send this in an authorization header. See example.

Back to top


If successful, this operation returns HTTP status code 200 or 204, with no response content:

  • If the request was valid and the grant was found and revoked, a 200 is returned.
  • If the request was valid but there was nothing to revoke—for example, the grant had already expired—a 204 is returned.

Back to top

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers

HTTP/1.1 200 OK
Content-Type: application/json

Sample response body


Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json, application/xml

Back to top

Response Body


Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the OAuthToken_{OAuthProviderName} cookie, or if you included an invalid cookie.

The resource could not be found. For example, you might get this if you have a typo in the URL, or if the Accept header is set to a wrong value.

You would also get this if you were using the wrong HTTP verb.

500 An error occurred processing the call.

More information about Akana OAuth API error messages.

Back to top

Related Topics