Skip to main content

How to Create and Revoke a cPanel API Token

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.

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

  1. Log in to your cPanel account.

  2. Locate the Software section and select API Tokens.

  3. Click Add API Token.

  4. Enter a name for the token (e.g., app_integration_name).

  5. Select the permissions for the token.

  6. Click Generate.

  7. 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

  1. Log in to your cPanel account.

  2. Navigate to the Software section and select API Tokens.

  3. Locate the token you wish to remove in the list of active tokens.

  4. 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.

Did this answer your question?