Page tree
Skip to end of metadata
Go to start of metadata

Integration links allow you to create a link in a user's cPanel interface. This link can be a simple link to a URL or a link that automatically logs you into an application with an authorization token, such as WHMCS.

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


Call the get_users_links function to determine the app key of the function that you wish to connect with an application link.

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

 


 

Call the create_integration_link function to create the application link.

The link will attempt to send the user to the location in the autologin_token_url parameter through an HTTP POST request with the app, token, user, and subscriber_unique_id parameters.

The destination server will respond with a JSON-encoded hash with either a redirect_url key or the retry and attempt keys.

  • If the response contains redirect_url, the system will redirect the user to that URL. (For example: {"redirect_url":"http://www.whmcs.com/client_area/login/?one_time_user_token_that_expires_in_120_seconds=d41d8cd98f00”} will send the user to that unique URL.)
  • If the response contains retry and attempt, the system will wait for the retry value in seconds for a maximum of 60 seconds and then attempt the call again. The attempt value indicates the number of attempts that your system has tried. The system will stop after 3 attempts. (For example, {"retry":30, "attempt":2} represents the second attempt to connect, and the system will pause the user for 30 seconds before it tries again.)

If the location in the autologin_token_url parameter does not respond, does not exist, or that parameter is empty, the link will send the user to the location in the url parameter. This is useful if you wish to create a simple link to a documentation site, a playlist of tutorial videos, another helpful website, or enthusiastic motivation from actor Shia Labeouf (https://www.youtube.com/watch?v=oTz93Y-qeq0).

Notes:

  • 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.
 Click to view examples...
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%2bAAALVUlEQVRo3sWZe3BU1R3HP79z793dZAPkBYIg4RUSBKkIEfC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jF6Gkfz%2bUFVABrOagWuWQSAHPAPdi4ntXWEjQt2DuB04HrgTmM7x7CQ1q5Sljr1nx2t5HvFuObkak%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
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%2bAAALVUlEQVRo3sWZe3BU1R3HP79z793dZAPkBYIg4RUSBKkIEfCNog5WbaWOHevUWttOVXxVtFWctmpb2xGptVOt1ken1bbSVsVSxVba8UkrsRIxYhbRJEqRVxJCErK7d%2b89%2fePcTW6WTdj4mH5nLuTunj3n%2b%2f2d3%2fn9fucc4f%2bAbdu2ISJkMhmxbXupiMwH0lrr33qet7W6uhoRKaivwlp9TCQSCQAFVAEdwL7gqxLgCeB0wAOuSqVSvywvLyeZTIrWeqLWukdrvVcpRXV19UF9q0%2bbeEC%2bEvgOsA74EVAaNBkP1AR%2fW0BdNBq1enp68Dyvzvf9P2qtVwNn%2bb5vh%2frrg%2f1JEP3hG0ehROFpt8qW2CLAymRceax7aXeHv2PtFSM3LtD4NwNxYAqQAn4CnAwcFupqLjADiAG%2fAOqCz2PAq0Bb7tjDFrC8Pj7gfVVdD%2b3p9xAUoJcCKzGuKUCHhWyPSWmiV7fvCQQ4wGXAKcAEIBrqbibweMBrSujzt4HOfHwKEhAiXR5YqQHYs6quJ%2fSdHwGOxbgCGg8NZQp7zhGxyvu39rY3AJOCxkXAnDxDWcD0nM9c4AUgA1BTUzPgyyEFhIhHgcXA1cBC4DHgxuX18fZQ89HALNBEZRRTnDPo8rdLt79r4aaelx%2bLqzHJ%2fKMIAmjo%2bzePAA8oBiYlEok6YNf06dP%2f1tTUpAeNQiHyDnAT8C36F18G%2bBWwgv6pPQVYo9GjjopcxMLYcjxSpPzO9mI1%2bg1BzQ9IBLQVGk1ad%2bFyAIfiroiUKIyb5aIFeAeoBQ4HtsZisQs6OzsbC3EhDUwMkc%2fO3DeAJPCDYOoXa%2fTImIximrMECxtBcFRRuUYvClscNHu8LWxzn2Gn9wZ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HBVWZAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE1LTA5LTAyVDEyOjM5OjQ4LTA1OjAwppVa9QAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNS0wOS0wMlQxMjozOTo0OC0wNTowMNfI4kkAAAAASUVORK5CYII%3d

 


 

Call the update_integration_link_token function to refresh the user's application token.

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

 


 

Call the list_integration_links function to retrieve a user's list of integration links.

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

 

Call the remove_integration_link function to remove the application's link from a user's cPanel interface.

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