Migrated cPanel account from one hosting provider to another using the Backup & Restore option, but the upgrade links in cPanel were also transferred. So when the user clicks on any of these options:
gets redirected to the old WHMCS account
The Cause
This happenes when hosting providers use the WHM API 1 manually to create integration links. So in this case the old hosting provider added the links using the API, to confirm this list user files inside this links directory:
ll /var/cpanel/integration/links/$USERNAME
![WHMCS App Links get transferred when migrating a cPanel account image 13 - WHMCS App Links get transferred when migrating a cPanel account](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/05/image-13.png?resize=736%2C430&ssl=1)
and check the userconfig files:
![WHMCS App Links get transferred when migrating a cPanel account image 14 - WHMCS App Links get transferred when migrating a cPanel account](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/05/image-14.png?resize=736%2C228&ssl=1)
.adminconfig | contains WHMCS token that is added automatically |
.userconfig | contains the links that were created using the WHM API 1 |
Another option to list all user integration links is using the API itself, for example to view link to the Invoices:
https://hostname.example.com:2087/cpsess##########/json-api/get_integration_link_user_config?api.version=1&user=$USERNAME&app=WHMCS_clientarea_invoices
![WHMCS App Links get transferred when migrating a cPanel account image 15 1024x146 - WHMCS App Links get transferred when migrating a cPanel account](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/05/image-15.png?resize=736%2C105&ssl=1)
UPDATE: TransferTool seems to also copy these integration links:
![WHMCS App Links get transferred when migrating a cPanel account image 37 - WHMCS App Links get transferred when migrating a cPanel account](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/05/image-37.png?resize=736%2C585&ssl=1)
The Solution
To fix this from WHMCS > Product click on the Manage App Links button to recreate the links:
Another Solution
Another option is to use the API to overwrite the links manually as shown here: https://api.docs.cpanel.net/guides/guide-to-integration-links/#create-the-integration-link
But note that the docs are outdated and you will need to modify the commands, for example, this command:
![WHMCS App Links get transferred when migrating a cPanel account image 16 - WHMCS App Links get transferred when migrating a cPanel account](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/05/image-16.png?resize=736%2C175&ssl=1)
..&app=WHMCS+Billing will show an error:
![WHMCS App Links get transferred when migrating a cPanel account image 17 - WHMCS App Links get transferred when migrating a cPanel account](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/05/image-17.png?resize=736%2C95&ssl=1)
so you will need to use:
..&app=WHMCS_clientarea_invoices
![WHMCS App Links get transferred when migrating a cPanel account image 15 1024x146 - WHMCS App Links get transferred when migrating a cPanel account](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/05/image-15.png?resize=736%2C105&ssl=1)
So instead I recommend just regenerating all the links from WHMCS, as shown above. ☝