How to manage API Tokens in cPanel

Last modified: July 31, 2020
You are here:
Estimated reading time: 1 min

Nowadays, we have the luxury to use API for programmatically using any system that provides API access. The good news is, cPanel now provides us API too! It means that a reseller or innovator can use the API to create a system based on cPanel that can automate many tasks. Let’s see how we can manage API tokens in cPanel.

Manage API Tokens in cPanel

cPanel is one of the famous and widely used web hosting control panels in Linux based servers. From the cPanel version 80 onwards, a new feature has been added which is known as Manage API Token. This interface is used to create and revoke list of API tokens. The need for API token is that a user will be able to login into the server without the need of a password.  An API token can be used to authenticate with the WHM remote API.  This feature allows the cPanel users to issue API tokens so that Resellers and third-party developers can use these API tokens to run API functions.

In this tutorial, we are going to discuss on how to create and revoke API token in cPanel. Please note, this feature is available only from the cPanel version 80 onwards.

1) Login to cPanel server.

2) Go to Security >> Manage API Tokens.

API Tokens

3) You can enter the API Token name, then click on “Create”. I have used “test” as the token name but you can name it whatever you want, It’s just for identification.

API Tokens

4) Now you have created an unrestricted API token. It will redirect you to the following page where you can see and copy the API token. Copy the API token by clicking on “COPY” as shown in the following image and then click on “YES, I SAVED MY TOKEN”.

API Tokens

5) Now you have successfully created the API token. If you want to revoke or rename an API token, click on the “MANAGE” button corresponding to the API token.

API Tokens

6) Here you can rename API token and then click on the “UPDATE” update button to update the token.

Manage API Token

 

7) If you want to revoke the API token click on “YES REVOKE THE TOKEN”.  Now you have successfully revoked the API token. Revoking a token renders it useless. It means that if you are using that token in any of your applications, it will not function anymore.

Manage API Tokens

Was this article helpful?
Dislike 0
Views: 10