The abbreviation API stands for Application Programming Interface. APIs were conceived to provide developers and dev-ops specialists with a seamless method of creating and integrating communication means between two (or more) applications.
In simpler terms, an API specifies how different software components should interact with each other. It is an intermediary between applications, enabling them to request and exchange information or perform specific tasks.
As WHMCS allows integrations with many third-party services (such as payment gateways, email providers, and registrars), it supports APIs for communicating with them and exchanging the information a web hosting business owner needs to achieve their goals.
In this tutorial, we will go over the process of generating API credentials in WHMCS and what information you need to allow communication between your WHMCS installation and the third-party services you installed for it.
To begin the process of generating API credentials, please log inside your WHMCS admin area. Afterward, please move your mouse cursor over the wrench icon on the top right side of the screen.
Doing so will inveil a drop-down menu. Please select the "System Settings" option.
After doing that, you will be redirected to the "System Settings" page, where you will see all the available WHMCS settings. Please use the search bar on the left side and type in "API Credentials".
Doing so will reveal the API credentials option. Please click on it.
Upon doing so, you will be redirected to the "API Credentials" page, where you will see all currently generated tokens, and you will also have an option of adding API roles and additional sets of credentials for these roles.
Before generating the API credentials, we need to create a role to associate them with. To do that, please click on the "API Roles" tab, located on the right side of the "API Credentials" tab.
Afterward, please click the "+ Create API Role" button beneath the mentioned tabs above. Performing this action will open a popup window allowing you to assign "Allowed Actions" for the role you are about to create.
Here are all the options available on the popup window:
Once you have set a name and description and allowed the necessary API actions for your role, please click on the "Save" button located at the bottom right side of the popup window.
Clicking the "Save" button will immediately populate the API roles table section with the newly created role.
Now that you have created an API role, it is time to create your set of API credentials that the respective role can use.
Creating API Credentials
To do so, please click on the "API Credentials" tab, located on the left side of the "API Roles" tab.
Upon doing so, WHMCS will reveal the API credentials table section, and above it, you will see the "+ Generate New API Credentials" button. Please click on it.
By doing that, you will open a popup window, allowing you to generate a set of API credentials. Here is the necessary information required to do so:
When you have typed/selected the required information above, please click on the "Generate" button at the bottom right side of the popup window.
After doing that, the popup window will disappear, and in its place, you will see a new one containing the API credentials you need - the API Identifier & API Secret.
IMPORTANT: Copy and save the API Secret somewhere, as it will not show up anymore after you close the popup window.
When you save your API Identifier and API Secret and close the popup window, you will notice that the API Credentials table section is now populated with the new pair of credentials.
That's it! You can now start using these API credentials in conjunction with the WHMCS APIs and integrate them with your applications so they can begin communicating together!
This concludes our tutorial on how to manage your API credentials in WHMCS. We hope you found it helpful and that you were able to integrate your application with all your third-party services successfully. If you want to learn more about WHMCS, please check the rest of our tutorials in our WHMCS section.
Nikola is an accomplished tech-savvy extraordinaire with over six years of experience in the web hosting field. He started as a customer care representative and quickly rose the ranks to become a support supervisor and, eventually - the head of the technical department in HostArmada. His deep understanding of the client's needs, combined with his technical knowledge, makes him the perfect man to create the ideal harmony between client satisfaction and professional problem-solving. You will often find him creating helpful tutorials, articles, and blog posts that help existing customers get around.