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.

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

This topic includes the following sections:

HTTP Method

PUT

Back to top

URL

https://{oauth-provider-url}/oauth/admin/token/revoke

Back to top

Sample Request

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

Request URL

https://{oauth-provider-url}/oauth/admin/token/revoke

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

Response

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

None.

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

None.

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.
500 An error occurred processing the call.

More information about Akana OAuth API error messages.

Back to top

Related Topics