BuycPanel Blog

BuycPanel Blog

Latest news and updates

What is the ‘Manage API Tokens’ Interface?

Posted by Allura on 10 04 2018.

About the Interface
API tokens enable you to log in to the server without any password. Apart from logging in without a password, API tokens can be used for authentication with WHM’s remote API. With the interface ‘Manage API Tokens’, API tokens can be created, listed and revoked. API tokens are actually very helpful. For example- A third-party reseller or developer gets the access to the data of your account in order to handle the API function calls.

At present, only the API tokens with the features mentioned below can be used:-

 	WHM API functions
 	DNS Clusters
 	Configuration Clusters


More about API Token

 	For a suspended account, API token cannot be created.
 	In the interface ‘Modify an Account’ in WHM (Home>>Accounts>>Modify an Account), the username of a cPanel account can be changed. If you make this change there, then the function of each API token which is linked to that particular account will…

About the Interface

API tokens enable you to log in to the server without any password. Apart from logging in without a password, API tokens can be used for authentication with WHM’s remote API. With the interface ‘Manage API Tokens’, API tokens can be created, listed and revoked. API tokens are actually very helpful. For example- A third-party reseller or developer gets the access to the data of your account in order to handle the API function calls.

At present, only the API tokens with the features mentioned below can be used:-

  • WHM API functions
  • DNS Clusters
  • Configuration Clusters

More about API Token

  • For a suspended account, API token cannot be created.
  • In the interface ‘Modify an Account’ in WHM (Home>>Accounts>>Modify an Account), the username of a cPanel account can be changed. If you make this change there, then the function of each API token which is linked to that particular account will be continued.
  • If a cPanel account gets deleted, the API token of that account automatically is revoked.
  • When you need to search a particular API token, the name has to be entered in the ‘Search’ text box. The names of the API tokens are fulfilled automatically by this interface.
  • Just beside of the ‘actions’ column heading, there is a ‘gear’ icon. If you want to refresh the list of the API tokens, first click on that icon and then click on the option ‘refresh list’.
  • The length of the API token name can be of 50 characters and it can be formed only with alphanumeric characters like underscores (_) and dashes (-).
  • After a new API token is generated, you can find the name and the time of creation of that API token under the menu ‘API Tokens’.

About The API Tokens Table

The following information is shown in the API Tokens Table:-

  • Name:-Here the name of the API Token is displayed.
  • Created:-Here the time of the creation of the API token is displayed in the MM DD YYYY hh:mm: ss format.
  • Actions:-Here the opinion like whether the API token is to be revoked or not is displayed.

Creating an API Token

The following steps are to be performed for the creation of an API token:-

  • First click on the option ‘generate token’. After you do that, a form named ‘generate token’ will be appeared.
  • Then, in the ‘name’ text box, the name you wish to give to the API token is to be entered.

Revoke an API token

In order to revoke an API token, these steps are to be followed:-

  • In the ‘API tokens list’, first, select the API token which is to be revoked.
  • Then, select the option ‘Revoke’ which you can find under the column ‘actions’. After this is done, you will get a confirmation message.
  • Finally, click on ‘continue’ to end the process. In the end, at the top of the interface, you will get a message of success.

Conclusion

On the workstation, the API token must be saved in a safe location. Once you log out from the interface or once the API Token Table is refreshed, the token cannot be accessed.