Remote Authentication - cPanel (No WHM) - ListPopAccounts

drako

Member
Dec 30, 2013
13
0
1
cPanel Access Level
Website Owner
Hello,

I am developing a new client app.
i need someone to guide me through an example of Remote Authenticating to cPanel (WHM Not Available). and get a list for pop accounts.

Many Thanks
 

drako

Member
Dec 30, 2013
13
0
1
cPanel Access Level
Website Owner
Hello Michael,

I have been searching there, but none talks about cpanel only authentication.
and i am kinda new to this

Many thanks
 

KostonConsulting

Well-Known Member
Verifed Vendor
Jun 17, 2010
255
1
68
San Francisco, CA
cPanel Access Level
Root Administrator
You'll just need to use basic authentication with cPanel user and their pass on port 2083 for cPanel.

Here's an example from their PHP class:

https://github.com/CpanelInc/xmlapi-php/blob/master/Examples/api2_example_withargs.php

Change:

Code:
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth("root",$root_pass);
to:

Code:
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth($cpanel_user,$cpanel_pass);
$xmlapi->set_port('2083');
to auth as a cPanel user.