How to Manage API tokens in cPanel WHM
API tokens in cPanel WHM allow you to run API functions outside of a WHM session. This can be useful, for example, to allow a reseller user or third-party developer to run API function calls with your account’s data
Creating an API Token
- Log into WHM as the root user.
- Navigate to the WHM >> Manage API Tokens interface.
- Click the blue “Generate Token” button.
- Type in a name for your API token.
- Scroll to the bottom of the page, and enable the “Everything - All Features” checkbox (this enables root-level access for the API token).
- Click "Save".
Please note that you cannot access the token after navigating away from the interface. If you forget or misplace this token, you must revoke the token and then create a new one.
Revoking an API Token
- Locate the API token that you want to revoke in the API Tokens list.
- Under the Actions column, click Revoke.
- A confirmation message will appear.
- Click Continue to revoke the token.
A message of success will appear in the upper-right corner of the interface.
API tokens are a powerful feature in cPanel WHM that allow for increased flexibility and security. Remember to always handle your tokens with care, as they are like passwords and should be kept secure