The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remote Authentication - cPanel (No WHM) - ListPopAccounts

Discussion in 'cPanel Developers' started by drako, Dec 30, 2013.

  1. drako

    drako Member

    Joined:
    Dec 30, 2013
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    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
     
  2. drako

    drako Member

    Joined:
    Dec 30, 2013
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    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
     
  3. KostonConsulting

    KostonConsulting Well-Known Member

    Joined:
    Jun 17, 2010
    Messages:
    255
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    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.
     
Loading...

Share This Page