WHM API endpoints, and you can revoke it any time without changing your login password.
Open it from cPanel home → Security → Manage API Tokens.


Generate a token
Give it a name
Pick a name that tells future-you what the token is for:
deploy-runner-prod, uptime-check, wp-toolkit-backups. Names are free-form; only you see them.Set an expiry (optional)
Pick a date the token should stop working on. Leave blank for a token that lives until you revoke it manually. For a one-off job, an expiry is the safer default.
Use a token
Pass the token in theAuthorization header on every API call. Format: Authorization: cpanel <username>:<token>.
--user:
Revoke a token
The list at the bottom of the page shows every active token with a Revoke action. Click it. The token stops working immediately. Anyone holding it gets401 Unauthorized on the next call.
Edit a token instead of revoking if you only need to change the name or the expiry.
What the token list shows
Each row in the token list has:- Name. What you typed at creation. Editable.
- Created. Timestamp the token was issued.
- Expires. The expiry date you set, or Never.
- Last Used. Last time the token authenticated a request. Useful for spotting tokens that nothing is actually using, those are safe to revoke.
Common patterns
One token per integration
Don’t reuse a single token across multiple tools. If one leaks, you can revoke it without breaking the others. Naming convention helps:<tool>-<env>-<purpose>.
Short-lived tokens for CI
Generate a token at the start of a deploy, set the expiry one day out, run the deploy, let it expire. Even better, revoke it at the end of the run. No long-lived secret sitting in a CI variable.Pair with WHM IP whitelisting
If a token is for a machine with a static IP (a deploy box, an uptime monitor), set the whitelist to that IP. A leaked token from anywhere else is useless.Common issues
401 Unauthorized on every request
401 Unauthorized on every request
The token works in cPanel calls but not WHM
The token works in cPanel calls but not WHM
cPanel API tokens are different from WHM API tokens. cPanel tokens are managed in this tool, scoped to your cPanel account; WHM tokens are managed by the server admin via WHM. On Noxity shared hosting, you only have cPanel API access.
I lost the token I generated
I lost the token I generated
cPanel doesn’t store the plaintext token, only a hash. There’s no recovery. Generate a new one, revoke the lost one.
Can I scope a token to one feature?
Can I scope a token to one feature?
Not in the cPanel token UI. The token can do anything the user can. Treat each token like a full credential and rotate often.



