The WHMCS custom app pulls out client information from WHMCS and displays matching details on the sidebar when you are responding to tickets inside Freshdesk. The WHMCS custom app can fetch and display details such as Products, Domains, and Invoices for each ticket based on the requester's email in Freshdesk. 

To install this custom app, you need to configure both WHMCS as well as Freshdesk. Please follow the instructions given below to setup and access the widget.

Quick Guide to Making Changes to Your WHMCS Server:

  • Click on this link to download the zip file. Unzipping it will give you the text file with the code in it. The php file containing the code is also attached to this solution article.
  • Place this code inside the whmcs installation folder, in such a way that it is accessible via URL. For example, you could place it in a location like
  • Make sure that your web server gives public access to the freshdesk_widget.php file. Right click that link and choose "Save" or you can download the file from the link at the bottom of this solution article. 
    You can modify the code in Apache to:

    <Location <whmcsinstallation folder>?freshdesk_widget.php>
    Order Allow,Deny
    Allow from All

    and in nginx to:

    location <whmcs installation folder>/freshdesk_widget.php {
    satisfy any;
    allow any;
    to allow public access.

  • Open the freshdesk_widget.php file. Modify the following define parameters:



app_key (for example, app_key= "abcEF123"). to be mentioned in the FreshPlug to provide first level access to this php file



URL to the WHMCS server along with the communication protocol (either http or https), like, 
Note: Be sure to type out the entire URL as mentioned above, starting with http or https.



API access user name(usually this will be ‘admin’ user if no special api user is created in whmcs application)



API access user password



Specify the autoauthkey which is configured in the <WHMCS_INSTALL_PATH>/configuration.php file (Refer: This is to enable the links inside freshdesk whmcs widget to directly take the logged in user to whmcs app, without requiring to login again when clicked.



This should be your freshdesk support portal along with the communication protocol (either http or https) -
Note: Be sure to type out the entire URL as mentioned above, starting with http or https.



Specify the api_access_key which is configured in the <WHMCS_INSTALL_PATH>/configuration.php file (Refer: This is necessary if the client machine from which the whmcs server will be accessed (via api) is not whitelisted inside the whmcs app.

  • In the configuration.php file, enter the api and auth keys like shown below. Make sure your entries match with the changes made in the freshdesk_widget.php file.

    $api_access_key = "abc123";
    $autoauthkey = "abcXYZ123";

Installing the WHMCS custom app:

  1. Login to your Freshdesk account. 
  2. Go to Admin > Helpdesk Productivity > Apps.
  3. Select the Custom Apps tab and click on the New Custom App button.
  4. Enter the title "WHMCSand description for the Custom App.
  5. Copy and paste the code from this file into the Script text box.
  6. Enter the whmcs_url and app_key details into the custom app code you just copy pasted into the text box. Make sure you match the app_key with details you mentioned in the freshdesk_widget.php file. The whmcs_url should be the access url of the freshdesk_widget.php file.
  7. Make sure that the Show widget in ticket view page checkbox is checked. You can also display WHMCS information in the contacts page by changing the Freshdesk placeholders accordingly.
  8. Save and enable the custom app.

You should now be able to see the WHMCS widget on the sidebar of the tickets view page in Freshdesk. If you are unable to retrieve information properly, please make sure that the details you entered in your freshdesk_widget.php file and the custom app script are the same as the ones on your WHMCS server.

If your WHMCS widget shows an error message:

Please check whether your freshdesk account is SSL enabled. If so, kindly add (/uncomment) the following line of code in the freshdesk_widget.php file's call_api() function. 

Sample Code: 

curl_setopt($ch, CURLOPT_SS:_VERIFYPEER, false);