You can create and revoke API tokens in cPanel to allow applications or scripts to interact with your account securely. This process provides a way to perform automated tasks without sharing your primary cPanel password.
Before you begin
You will need:
A valid cPanel account
Access to the cPanel interface
Create a cPanel API Token
Log in to your cPanel account.
Locate the Software section and select API Tokens.
Click Add API Token.
Enter a name for the token (e.g.,
app_integration_name).Select the permissions for the token.
Click Generate.
Copy the token immediately.
Warning: You will only see the full API token once at the time of creation. If you do not save it in a secure location, you will not be able to retrieve it later and will need to create a new one.
Revoke a cPanel API Token
Log in to your cPanel account.
Navigate to the Software section and select API Tokens.
Locate the token you wish to remove in the list of active tokens.
Click the Delete or Revoke button next to that token.
Confirm the result
Creation: After generating a token, the token will appear in your list of active tokens with the name you provided.
Revocation: The specific token will no longer appear in the list of active tokens in the API Tokens section.
Limitations
A revoked token is immediately invalidated and cannot be reused.
If you lose a token during the creation process, you must delete the orphaned entry (if it appears) and create a new one.
