This function returns a list of a cPanel account's API tokens.
uapi --output=jsonpretty \ --user=username \ Tokens \ list
{- "apiversion": 3,
- "func": "list",
- "module": "Tokens",
- "result": {
- "data": [
- {
- "create_time": 1549471343,
- "expires_at": 1609372800,
- "features": [ ],
- "has_full_access": 1,
- "name": "exampletoken"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}