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
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: