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.
To create an API token, use WHM's Manage API Tokens interface (WHM >> Home >> Security Center >> Manage API Tokens). Then, include that API token in your custom code.
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 if you refresh the API Tokens table.
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: