Skip to main content

Revoke Token

To terminate the token before its expiration date, execute a POST request to the Inspector Cloud backend API. The request to endpoint /api/auth/v1.0/revoke_token/ must contain the master key in the header and token in the request body.

Adress: POST https://instance_name/api/auth/v1.0/revoke_token/

Content-type: application/json

Request body parameters


token string

Revocable token.


Request example

curl –i –X POST
https://test.inspector-cloud.com/api/auth/v1.0/get_token/
-H 'Authorization: Token XXXX'
-F "token=39fbb6e9-fbf9-459a-9e1b-416dbcf51875e"

Response example

The request was successfully completed.

Response code: 200

{
"SUCCESS": true
}

Error, for example, the token was not found.

Response code: 404

{
"SUCCESS": false
}

Token validity period

The token expiration date is explicitly reported in the response to get_token.

The backend of a third-party mobile application must independently update the token before the expiration of the previous one.

To authorize a third-party mobile application in the IC Camera application, you can use any valid token.

Note

We recommend receiving a new token in advance, without waiting for the expiration of the previous one. This way you will have time to distribute the new token to all installed instances of a third-party mobile application before the expiration of the old token.

If you have any questions or problems, contact technical support.