SOLVED Remove WHMCS application links

KJ

Member
Feb 15, 2006
11
1
153
Hello,

We've been creating for quite some time now new cPanel accounts through WHMCS. Today a reseller requested us to remove the WHMCS links from a specific cPanel account under his management because he wants to give to his client access to the account.

After searching, i came up with this link: https://support.cpanel.net/hc/en-us/articles/360052229113-How-to-remove-WHMCS-application-links

Haven't used the cPanel API before so please bare with me.

I need to remove all the WHMCS links and the group too. From what i understand i need to log in as root user and run:

whmapi1 --output=json remove_integration_group user=$user group_id=whmcs

Then run:

whmapi1 --output=json list_integration_links user=$user | /usr/local/cpanel/3rdparty/bin/perl -e 'use Cpanel::JSON; my $json = Cpanel::JSON::Load(<STDIN>); for my $item ( @{$json->{data}->{links}} ) { my $thing = $item->{app}; print qx{whmapi1 remove_integration_link user=$user app=$thing}; };'

And finally run:

mv -v /home/$user/.cpanel/datastore/AVAILABLE_APPLICATIONS_CACHE_en_paper_lantern /home/$user/.cpanel/datastore/AVAILABLE_APPLICATIONS_CACHE_en_paper_lantern.bak

The only parts i need to change is the "$user" (where i'll enter the username) and the "paper_lantern" (where i'll enter "jupiter").

Do i get it correctly, is this all i need to do? I mean there is nothing from the WHMCS side that i also need to do, right?

Kindest regards,
IK
 
Last edited by a moderator:

KJ

Member
Feb 15, 2006
11
1
153
That all sounds correct to me - just change the "user" section to the specific user you're working with and it will remove those links.
Worked perfectly fine :)

As mentioned, replaced the $user with username and the paper_latern with jupiter and the script did its job.

Thank you
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
948
29
178
How to do this for all users?

Noticed one server with these links back to WHMCS in cpanel. The application links within cpanel are disabled - yet these icons still appear in cpanel for all users. I need to remove these links server wide.