Get a list of all user’s persistent tokens

POST /tokens


Description

The method returns a list of all active persistent user tokens. A token is required, see Authorization.


Request format

  • HTTP method: POST
  • URL: /tokens
  • Content type: application/json

Authorization

Pass the token in one of two ways:

  • the token: <jwt-token> header — a temporary JWT token obtained with user/login;
  • the token field in the request body — a permanent API token (UUID) from your account.

Without a token the request returns 401 access denied.


Example Request (cURL)

curl -X POST "https://api.neuro-vision.ru/v1/tokens" -H "Content-Type: application/json" -H "token: <jwt-token>"

Example Answers

Success (200 OK)

[
  {
    "expires": "2020-04-27T19:05:18.067Z",
    "id": "15979340-8293-11ea-8a91-30916e1c4b90"
  }
]

Error (401 Unauthorized)

{
  "message": "access denied",
  "status": "error"
}