Get token information: Auth.TokenInfo

The method is used to retrieve information about the OAuth tokens for debugging purposes.

Parameters

params: array

List of Tokens string to inspect


params[]: string

No description


Result

result: object


result{}: TokenInfo aka object

OAuth token information

result{}...

result{}.type: string

No description


result{}.live: integer

No description


result{}.view: integer

No description


result{}.copy: integer

No description


result{}.from: integer

No description


result{}.to: integer

No description


result{}.create: integer

No description


result{}.expire: integer

No description


result{}.stream: integer

No description


result{}.whitelist: array

optional

Default:

JSON
[]

List of IP addresses allowed access without authentication

IP whitelist for unauthorized access


result{}.whitelist[]: IpAddress aka string

Pattern: ^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$|^(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$

IPv4 or IPv6 address



POST /api/

JSON
{
  "jsonrpc": "2.0",
  "method": "Auth.TokenInfo",
  "params": [
    "your_token_0",
    "your_token_1"
  ],
  "id": 123
}
cURL
Bash
curl -k --request POST \
    --url 'https://your-domain/api/' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer <api-authorization-token>' \
    --data '{
  "jsonrpc": "2.0",
  "method": "Auth.TokenInfo",
  "params": [
    "your_token_0",
    "your_token_1"
  ],
  "id": 123
}'

200 OK

JSON
{
  "jsonrpc": "2.0",
  "result": {
    "your_token_0": {
      "type": "api_or_access",
      "live": 1,
      "copy": 1,
      "view": 1,
      "from": 0,
      "to": 0,
      "create": 1234567890,
      "expire": 1234567890,
      "stream": 1,
      "whitelist": [
        "89.0.142.86",
        "89.0.142.86"
      ]
    },
    "your_token_1": {
      "type": "api_or_access",
      "live": 1,
      "copy": 1,
      "view": 1,
      "from": 0,
      "to": 0,
      "create": 1234567890,
      "expire": 1234567890,
      "stream": 1,
      "whitelist": [
        "89.0.142.86",
        "89.0.142.86"
      ]
    }
  },
  "id": 123
}

400 Bad Request

JSON
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32601,
    "message": "Method not found"
  },
  "id": 123
}

500 Internal Server Error

Server error