How to Generate a WHM API Token?
A WHM API Token allows external applications (like billing software) to interact with WHM securely without using your actual password. API tokens are more secure than passwords for automated integrations.
Generate a WHM API Token
- Login to WHM.
- Go to Development → Manage API Tokens.
- Click Generate Token.
- Enter a Token Name (e.g., "WHMCS Integration", "Billing System").
- Set an optional Expiry Date — leave blank for no expiry.
- Set Privileges — you can restrict the token to specific API functions only.
- Click Generate.
- Copy the generated token immediately — it is only shown once.
Important: Copy and save the API token immediately after generation. WHM does not show the token again after you leave this page. If lost, you must generate a new token.
Using the API Token in Integrations
When connecting external software to WHM:
- Use your WHM username as the username.
- Use the API Token as the password (not your actual WHM password).
- The software communicates with WHM over HTTPS on port 2087.
Manage Existing API Tokens
- Go to WHM → Development → Manage API Tokens.
- View all existing tokens with their names and creation dates.
- Click Revoke next to a token to immediately disable it.
Security Best Practice: Create separate API tokens for each integration. If one integration is compromised, you can revoke only that token without affecting others.
If you continue to face issues, please open a create a request.
