Create integration link
This function creates an integration link in the cPanel interface.
Note:
The function creates the APP.adminconfig and APP.userconfig integration link files in the /var/cpanel/integration/links/USERNAME directory, where APP represents the application name and USERNAME represents the user for whom you create integration links.
Query parameters
The application to link.
Note:
- If you create a link with an app value that already exists, the function will replace the existing link with the newly-created link.
- The value you assign to the app parameter is how you identify that integration link when listing or removing integration links.
- You may include underscore (_) characters.
The service for which to implement authentication.
Note:
This is a string from the get_users_links function. The function typically returns one of the following values.
- billing - This link appears in the user menu
- customer_service - This link appears in the user menu
- support - This link appears in the user menu
- upgrade - This link appears in the user menu and context-sensitive areas when the user may require more of a resource
The label to display in the cPanel login interface.
The subscriber's unique ID that the system will present to the URL in the autologin_token_url endpoint.
The token that the system will present to the URL in the autologin_token_url endpoint.
The cPanel account name.
The URL to which the server will send the app, token, user, and subscriber_unique_id values through an HTTP POST request. The destination server will respond with a JSON-encoded object with either a redirect_url key or the retry and attempt keys.
Note:
- You must include either the autologin_token_url parameter, the url parameter, or both.
- If you do not set the autologin_token_url parameter, or that server does not respond or exist, then the server will redirect the user to the location in the url parameter.
- 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 three 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.)
The icon image.
Note:
If you do not specify a value, the interface uses a standard puzzle piece icon.
The group ID in which to add the icon of the linked service.
- files
- databases
- domains
- metrics
- security
- software
- advanced
- pref
Note:
If you do not specify a value, the function automatically creates an item under the username menu in the interface header.
Whether the cPanel interface will display the integration link.
- 1 - Do not display the link.
- 0 - Display the link.
The order in which to display the icon in the cPanel interface inside the group_id group.
The URL to which to send the user if the autologin_token_url location does not respond or is not present.
Note:
- You must include either the autologin_token_url parameter, the url parameter, or both.
Response
HTTP Request was successful.
Example response
{
"metadata": {
"command": "create_integration_link",
"reason": "Ok",
"result": 1,
"version": 1
}
}