WHMCS App Links get transferred when migrating a cPanel account

WHMCS App Links get transferred when migrating a cPanel account

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:

cPanel statistics > Upgrade quota option
cPanel statistics > Upgrade quota option
cPanel Billing & Software section
cPanel Billing & Software section

gets redirected to the old WHMCS account

chrome MgK3yoDK3l - WHMCS App Links get transferred when migrating a cPanel 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
image 13 - WHMCS App Links get transferred when migrating a cPanel account

and check the userconfig files:

image 14 - WHMCS App Links get transferred when migrating a cPanel account
.adminconfigcontains WHMCS token that is added automatically
.userconfigcontains 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
image 15 1024x146 - WHMCS App Links get transferred when migrating a cPanel account

UPDATE: TransferTool seems to also copy these integration links:

image 37 - WHMCS App Links get transferred when migrating a cPanel account

The Solution

To fix this from WHMCS > Product click on the Manage App Links button to recreate the links:

image 12 1024x394 - WHMCS App Links get transferred when migrating a cPanel account

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:

image 16 - WHMCS App Links get transferred when migrating a cPanel account

..&app=WHMCS+Billing will show an error:

image 17 - WHMCS App Links get transferred when migrating a cPanel account

so you will need to use:

..&app=WHMCS_clientarea_invoices

image 15 1024x146 - WHMCS App Links get transferred when migrating a cPanel account

So instead I recommend just regenerating all the links from WHMCS, as shown above. ☝

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.