Development Guides Home

Guide to Integration Links

Introduction

Integration links create a link in a user's cPanel interface using WHM API 1. Integration links can be simple links to a URL or links that automatically log in to an application with an authorization token, such as WHMCS.

The link will appear in a selected cPanel interface group and the user Preferences menu.

Determine the appkey for integration

Call the get_users_links function to determine the appkey that you wish to use. You will need to provide the username of the account as these are specific to a user's account. You will get back a list of file values, each of which include their applicable appkey.

https://hostname.example.com:2087/cpsess##########/json-api/get_users_links?api.version=1&user=username

Create the integration link

Call the create_integration_link function to create the integration link.

  • The value of the implements parameter will be the appkey you decided in the previous step.
  • The value you assign to the app parameter is how you identify that integration link when listing or removing integration links.
  • If you create a link with an app parameter that already exists, the function will replace the existing link with the newly-created link.
  • To rename an integration link, you must remove it and then re-create it.

The link will send the user to the value of the autologin_token_url parameter through an HTTP POST request. If the location value of the autologin_token_url parameter does not respond, does not exist, or that parameter is empty, the link will send the user to the value of the url parameter.

Integration link using the autologin_token_url parameter:

https://hostname.example.com:2087/cpsess##########/json-api/create_integration_link?api.version=1&user=username&implements=support&label=WHMCS+Support+Desk&app=WHMCS_support&autologin_token_url=http://www.example.com/login.cgi&subscriber_unique_id=1234&url=http://www.cpanel.net&token=subway&base64_png_image=iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABmJLR0QA%2fwD%2fAP%2bgvaeTAAAACXBIWXMAAABIAAAASABGyWs%2bAAALVUlEQVRo3sWZe3BU1R3HP79z793dZAPkBYIg4RUSBKkIEfCNog5WbaWOHevUWttOVXxVtFWctmpb2xGptVOt1ken1bbSVsVSxVba8UkrsRIxYhbRJEqRVxJCErK7d%2b89%2fePcTW6WTdj4mH5nLuTunj3n%2b%2f2d3%2fn9fucc4f%2bAbdu2ISJkMhmxbXupiMwH0lrr33qet7W6uhoRKaivwlp9TCQSCQAFVAEdwL7gqxLgCeB0wAOuSqVSvywvLyeZTIrWeqLWukdrvVcpRXV19UF9q0%2bbeEC%2bEvgOsA74EVAaNBkP1AR%2fW0BdNBq1enp68Dyvzv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bEzMGsw4VAhSCrtN7fticJuw%2b0HPTj3Cg0ArOP3UF%2fVZjFncDyYRArFL2YauBJgJHOOErs0WpncktZxu%2bt8NEtvs6kF429lqVVd%2bUXMBhCwuLAnzDF2KeBW4Fbsi%2fDSY6FRoPJmEX4aeF4gvOj4WJQATn3A%2fMYeJuYRS%2bmTP4XQ1eouzAHYBvg4D0jJvtPBgbE%2bI8lIAQbk5lzo0kaE%2f8vBD6LqZ3yZdVOTNY9D%2bPr6%2fK0OYxBLjM%2bCQGCCaXhCz0XE5VuCwh2AP8g%2fyy0YCx%2fIPj7GmB9TptmYI8Su%2b80%2b2MLCC0kF3Pd8yVMcbUfeAiz8MKEtwEf5OmqAdgben8XU%2b0%2bD%2bzGXBZ%2bAfiLr93gzrJwFNQ6tB7KMHF6M7B34D0xEeDXgdAs%2fIDsvVmjhNpXY0qYTUDqo5blw72p7yB07Li8Ps6quh6uqy9GUGngVQ0X0D%2bz7YJuAOk77wkRDW8tPzIKEnAo60RVORErhq%2b9dUrsKIgjIL722l0%2fucVSDh2pDwoZatj4H%2bRdIAdHBVWZAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE1LTA5LTAyVDEyOjM5OjQ4LTA1OjAwppVa9QAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNS0wOS0wMlQxMjozOTo0OC0wNTowMNfI4kkAAAAASUVORK5CYII%3d

Integration link using the url parameter:

https://hostname.example.com:2087/cpsess##########/json-api/create_integration_link?api.version=1&user=username&implements=support&label=WHMCS+Support+Desk&app=WHMCS_support&url=http://www.cpanel.net&token=subway&base64_png_image=iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABmJLR0QA%2fwD%2fAP%2bgvaeTAAAACXBIWXMAAABIAAAASABGyWs%2bAAALVUlEQVRo3sWZe3BU1R3HP79z793dZAPkBYIg4RUSBKkIEfCNog5WbaWOHevUWttOVXxVtFWctmpb2xGptVOt1ken1bbSVsVSxVba8UkrsRIxYhbRJEqRVxJ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x2t5HvFuObkak%2f%2bfZNdCFSTbDRRQ4D3MuWo%2fZ0TUtr493BsRHA7OBE4P%2fiz7CGK4Sq%2fmcv%2f7Qe%2bi089F6oMeFXWgeJqlN7FdONybRlGKuhwpBOngkEFjI%2bauHOYWLBOPEQuZ%2fTkn0wm63ve3eBT5KBk5euPP%2fYBbwMsyFwobgacTUMvfQfx00FCIU5t8hjqwFrg%2bEzMGsw4VAhSCrtN7fticJuw%2b0HPTj3Cg0ArOP3UF%2fVZjFncDyYRArFL2YauBJgJHOOErs0WpncktZxu%2bt8NEtvs6kF429lqVVd%2bUXMBhCwuLAnzDF2KeBW4Fbsi%2fDSY6FRoPJmEX4aeF4gvOj4WJQATn3A%2fMYeJuYRS%2bmTP4XQ1eouzAHYBvg4D0jJvtPBgbE%2bI8lIAQbk5lzo0kaE%2f8vBD6LqZ3yZdVOTNY9D%2bPr6%2fK0OYxBLjM%2bCQGCCaXhCz0XE5VuCwh2AP8g%2fyy0YCx%2fIPj7GmB9TptmYI8Su%2b80%2b2MLCC0kF3Pd8yVMcbUfeAiz8MKEtwEf5OmqAdgben8XU%2b0%2bD%2bzGXBZ%2bAfiLr93gzrJwFNQ6tB7KMHF6M7B34D0xEeDXgdAs%2fIDsvVmjhNpXY0qYTUDqo5blw72p7yB07Li8Ps6quh6uqy9GUGngVQ0X0D%2bz7YJuAOk77wkRDW8tPzIKEnAo60RVORErhq%2b9dUrsKIgjIL722l0%2fucVSDh2pDwoZatj4H%2bRdIAdHBVWZAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE1LTA5LTAyVDEyOjM5OjQ4LTA1OjAwppVa9QAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNS0wOS0wMlQxMjozOTo0OC0wNTowMNfI4kkAAAAASUVORK5CYII%3d

Using an integration link

If you need to pass a dynamic parameter to the integration link, you can use the context parameter. The system will forward the context parameter to the integration link.

Integration link using the context parameter:

https://hostname.example.com:2083/cpsess##########/frontend/paper_lantern/integration/index.html?app=WHMCS_support&context=additional_info_3rd_party_has_dynamically_supplied

Change the user's application token

Call the update_integration_link_token function to change the user's application token for an already existing integration link.

https://hostname.example.com:2087/cpsess##########/json-api/update_integration_link_token?api.version=1&user=username&app=WHMCS_billing&token=subway

List integration links

Call the list_integration_links function to retrieve a user's currently active integration links. The returned metadata will list the app variable's value. This is a useful way to look up the app value for use in the get_integration_link_user_config and remove_integration_link functions.

https://hostname.example.com:2087/cpsess##########/json-api/list_integration_links?api.version=1&user=username

Get integration link configuration information

Call the get_integration_link_user_config function to retrieve configuration information about a specified integration link in a specified user's cPanel interface. This function is useful if you wish to confirm the information in an integration link is correct.

https://hostname.example.com:2087/cpsess##########/json-api/get_integration_link_user_config?api.version=1&user=username&app=WHMCS+Billing

Delete an integration link

Call the remove_integration_link function to remove the application's link from a user's cPanel interface. You may only remove one integration link each time you call a function.

https://hostname.example.com:2087/cpsess##########/json-api/remove_integration_link?api.version=1&user=username&app=WHMCS+Billing