Jump to content

Reseller package update in CWP pro from clientexec not working - API set up


Recommended Posts

Hi,

I have set up a few reseller packages in CWP pro. I have set up the API as per WHMCS. The user is getting created from clientexec, however I want to assign them the reseller packages. However the new user is getting created with Default package. 

I think i might be missing some API permissions. Which API permissions are required to assign reseller packages. 

 

Link to comment
Share on other sites

you can check here 

https://docs.control-webpanel.com/docs/developer-tools/api-manager/functions/function-api-account/add

$data = array(“key => MYKEY”,”action”=>’add’, domain”=>’MY_DOMAIN’, user”=>’USER’, pass”=>’PASSWORD’, email”=>’email@account’, package”=>’PACKAGE_NAME’, inode”=>’0’,”limit_nproc”=>’40’,”limit_nofile”=>’0’,”server_ips”=>’MY_IP_SERVER’);
$url = https://IPSERVERAPI:2304/v1/account”;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, POST”);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt ($ch, CURLOPT_POST, 1);
$response = curl_exec($ch);
curl_close($ch);

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...