- This line was added.
- This line was removed.
- Formatting was changed.
API tokens allow you to call WHM API 1 functions outside of a WHM session.
You can use API tokens instead of a password or access hash key to call WHM API 1 functions over HTTPS. This is 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
Make certain that you save your API token in a secure location on your workstation. You cannot access the token after navigating away from the interface or refreshing the API Tokens table.
Using an API token
To call a WHM API 1 function with an API token, call it via HTTPS and include the following HTTP header in your request:
Authorization: whm username:token
In this example,
Use the following examples to create a script that includes the API token in your custom code: