Creating a cPanel API token for an authorised integration

A cPanel API token lets an authorised integration call supported account APIs without storing the interactive password. Treat the token as a powerful secret tied to that hosting account; a descriptive name does not by itself restrict what the integration can do.

Check access and requirements

Confirm the integration uses the cPanel API rather than WHM and supports token authentication. Review the required operations and the account’s available permissions. Do not put tokens in browser JavaScript, a public repository or a URL query string.

01 Create a cPanel API token for an authorised integration

  1. Open Manage API Tokens in cPanel and choose Create. Give the token a unique name identifying the integration and purpose.
  2. Select an appropriate expiry date when available and record the renewal owner. The current interface does not allow changing an existing token’s expiry after creation.
  3. Create the token and copy it immediately into the integration’s protected secret store. The full value is not available again after leaving the creation screen.
  4. Configure the integration to use HTTPS and the vendor’s documented authentication format. Test a read-only operation first, then the smallest necessary authorised action.
  5. Review the token list periodically. Rotate by installing and testing a replacement before revoking the retired token, and remove expired entries from the list.

Confirm the expected result

The intended integration should authenticate against the correct server and account. Check that logs redact the token and that the application does not expose it to ordinary visitors.

Resolve setup problems

If a token is lost or exposed, revoke it and create a replacement. Renaming does not rotate its secret. If a call is denied, verify the endpoint and account permissions instead of using the owner password as an undocumented fallback.

Is this the same as a WHM token?

No. WHM and cPanel authenticate different APIs and operate at different administrative scopes. Use the token type required by the integration, and do not assume WHM ACL controls are present on a cPanel token screen.

Sources and further reading

  • 0 Users Found This Useful
  • cpanel-whm, development
Was this answer helpful?

Related Articles

Changing or recovering your cPanel password

Your cPanel password controls access to the hosting account and may also be used by its main...

Changing your cPanel interface theme and finding familiar tools

A cPanel theme changes how management tools are presented. It does not change your public...

Checking disk space and traffic usage in cPanel

Disk usage is stored data; bandwidth is data transferred. A large folder consumes disk space...

Creating a scheduled cron task in cPanel

Cron runs a command on a schedule without a browser visit. Applications use it for queues,...

Choosing where cPanel cron output is emailed

Cron output emails are useful when a scheduled command reports a failure or diagnostic message....