Page tree
Skip to end of metadata
Go to start of metadata

(Home >> Development >> Manage API Tokens)

Overview

The Manage API Tokens interface allows you to create, list, and revoke API tokens. API tokens allow you to log in to the server without the need for a password. You can use an API token to authenticate with WHM’s remote API.

 This is useful, for example, to allow a reseller or third-party developer to run API function calls with your account's data. 

Important:

  • Currently, you can only use API tokens with the following features:
  • You cannot create an API token for a suspended account.

Notes:

  • If you change a cPanel account's username in WHM's Modify an Account interface (Home >> Accounts >> Modify an Account), any API tokens associated with that account will continue to function.
  • If you delete a cPanel account, the system automatically revokes the account's API token.

The API Tokens table

The API Tokens table contains the following information:

ColumnDescription
NameThe API token's name.
CreatedThe time that you created the API token, in MM DD YYYY hh:mm:ss format..
ActionsWhether to revoke the API token.

To search for an API token, enter a term in the Search text box. The interface automatically filters the API token names as you type.

To refresh the API tokens list, select the gear icon () next to the Actions column heading and click Refresh List.

Create an API token

To create an API token, perform the following steps:

  1. Click Generate Token. The Generate Token form will appear.
  2. Enter a name for the API token in the Name text box.

    Note:

    An API token name's maximum length is 50 characters and the name can only contain alphanumeric characters, dashes (-), and underscores (_).

  3. Click Generate. The new API token, its name, and its creation time will appear in the API Tokens menu.

    Warning:

    Make certain that you save your API token in a safe location on your workstation. You cannot access the token after you navigate away from the interface or refresh the API Tokens table.

Revoke an API token

To revoke an API token, perform the following steps:

  1. Locate the API token that you want to revoke in the API Tokens list.
  2. Under the Actions column, click Revoke. A confirmation message will appear.
  3. Click Continue to revoke the token. A message of success will appear in the upper-right corner of the interface.

Additional Documentation