Look up API token details

This function looks up an API token’s details based on the token itself.

SecurityBasicAuth
Request
query Parameters
token
required
string

The API token.

Example: token=GVJWD78FF12NMBFKYKPS9BJ483C0XSQH
Responses
200

HTTP Request was successful.

Response Schema: application/json
Any of:
object

The API token’s details. Only present if the system recognizes the given token.

object (Metadata)
get/api_token_get_details
Request samples
whmapi1 --output=jsonpretty \
  api_token_get_details \
  token=GVJWD78FF12NMBFKYKPS9BJ483C0XSQH
Response samples
application/json
{
  • "data": {
    • "acls": [
      • "create-acct",
      • "kill-acct",
      • "list-accts"
      ],
    • "create_time": 1483625276,
    • "expires_at": 1609372800,
    • "name": "example",
    • "whitelist_ips": [
      • "192.0.2.1",
      • "192.0.2.2",
      • "192.0.2.8/29",
      • "fc00:abcd:0000:0000:0000:0000:0000:000f",
      • "2620:0000:28a4:0000:0000:0000:0000:0000/48"
      ]
    },
  • "metadata": {
    • "command": "api_token_get_details",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}