Tokens
4 functions, invoked through the cpanel_uapi tool.
cpanel_uapi(service_id, module="Tokens", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.create_full_access GET#
Create cPanel API token
This function creates a new API token with full access to all of a cPanel account's features.
Note:
The token only grants access to the features that the account has access to. For example, if you disable the File Manager feature, the token can't access it.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
list GET#
Return cPanel API tokens
This function returns a list of a cPanel account's API tokens.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:
rename GET#
Update cPanel API token's name
This function renames a cPanel account's existing API token.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
Payload varies by call.
revoke GET#
Remove cPanel API token
This function removes an API token from a cPanel account.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
Whether the system removed the API token. 1 - The system removed the API token or the API token doesn't exist. 0 - The system did not remove the API token. Note: The system returns the data value in the function's metadata. This differs from our usual API return format. For more information, read our [UAPI Introduction](/cpanel/introduction/) documentation.