Short answer: Open cPanel Manage API Tokens, click 'Create Token', configure required API privileges, and save the generated private key token securely for script automation.
Issue, configure, and revoke automated authentication tokens for secure command-line scripts and UAPI integrations without master passwords.
Quick reference
| Interface Location | cPanel > Security > Manage API Tokens |
|---|---|
| Supported APIs | UAPI & cPanel API 2 |
| Expiry Controls | Configurable expiration timestamps |
| HTTP Header Format | Authorization: cpanel username:token |
Steps
- Open Manage API Tokens: Under the Security section in cPanel, click Manage API Tokens.
- Initiate Token Creation: Click Create and provide an alphanumeric identifier in the API Token Name field.
- Set Lifespan: Choose whether the token remains perpetual or configure an automated expiration date.
- Store Securely: Click Create, copy the generated hash immediately into your secure environment, and click Yes, I Saved My Token.
Troubleshooting and tips
- One-Time Display Security: The plaintext token hash is never shown again after closing the confirmation dialog. If misplaced, navigate to Manage and click Revoke, then generate a replacement.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket