Fortinet black logo

REST API Solution Guide

OAuth server revoke token (/oauth/revoke_token/)

OAuth server revoke token (/oauth/revoke_token/)

URL: https://[server_name]/api/v1/oauth/revoke_token/

This endpoint is used to revoke, or otherwise delete, an OAuth access token entry from the database when the authorized client wants to revoke that token.

Allowed methods

HTTP method Resource URI Action
POST /api/v1/oauth/revoke_token/ Revoke specified token

Response codes

In addition to the general codes defined in General API response codes, a POST request to this resource can also result in the following return codes:

Code Response content Description
200 OK Token was or was not successfully deleted

Example

Revoke a Token:

curl -k -v -X POST \

https://[FAC_IP]/api/v1/oauth/revoke_token/ \

-H 'Content-Type: application/json' \

-d '{

"client_id": "fcare",

"token": "zGSaz2yqfjco7qWLQW2ctZXlhbRRJ"

}'

Response:

200 OK

OAuth server revoke token (/oauth/revoke_token/)

URL: https://[server_name]/api/v1/oauth/revoke_token/

This endpoint is used to revoke, or otherwise delete, an OAuth access token entry from the database when the authorized client wants to revoke that token.

Allowed methods

HTTP method Resource URI Action
POST /api/v1/oauth/revoke_token/ Revoke specified token

Response codes

In addition to the general codes defined in General API response codes, a POST request to this resource can also result in the following return codes:

Code Response content Description
200 OK Token was or was not successfully deleted

Example

Revoke a Token:

curl -k -v -X POST \

https://[FAC_IP]/api/v1/oauth/revoke_token/ \

-H 'Content-Type: application/json' \

-d '{

"client_id": "fcare",

"token": "zGSaz2yqfjco7qWLQW2ctZXlhbRRJ"

}'

Response:

200 OK