Return WHM API tokens

This function lists a WHM account's API tokens.

Authorizations:

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty \
  api_token_list

Response samples

Content type
application/json
{
  • "data": {
    • "tokens": {
      • "my-controller-token": {
        • "acls": {
          • "create-acct": 0,
          • "edit-account": 0,
          • "limit-bandwidth": 1,
          • "list-accts": 1,
          • "suspend-acct": 1,
          • "upgrade-account": 0
          },
        • "create_time": 1483625276,
        • "expires_at": 1609372800,
        • "name": "my-controller-token",
        • "whitelist_ips": [
          • "192.0.2.1",
          • "192.0.2.2",
          • "192.0.2.8/29"
          ]
        },
      • "my-read-only-token": {
        • "acls": {
          • "create-acct": 0,
          • "edit-account": 0,
          • "limit-bandwidth": 0,
          • "list-accts": 1,
          • "suspend-acct": 0,
          • "upgrade-account": 0
          },
        • "create_time": 1490882281,
        • "expires_at": null,
        • "name": "my-read-only-token",
        • "whitelist_ips": null
        }
      }
    },
  • "metadata": {
    • "command": "api_token_list",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}