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.

Accessing cPanel XML API from a client computer

Discussion in 'cPanel Developers' started by k_shehadeh, Mar 31, 2009.

  1. k_shehadeh

    k_shehadeh Member

    Joined:
    Mar 27, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Looking over the cPanel XML API here:
    http://www.cpanel.net/plugins/xmlapi/cpanel.html

    It's not entirely clear to me if the API can be accessed from a client machine (not a script on the server). I guess what I'm asking is if there are imposed security limitations that make it impossible to accesss the API from a machine other than the one that cPanel is running.
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    As long as you authenticate successfully, the API can be used from any remote machine.
     
  3. k_shehadeh

    k_shehadeh Member

    Joined:
    Mar 27, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Can authentication be from a non-root user? That is, the owner of the hosting account? And, more generally, I can't seem to find the documentation for the different forms of authentication along with detail about each. That would help a great deal.

    Thanks!
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Yes, authentication to the XML API being accessed over the WHM ports (2086 and 2087) can be resellers and root users. If you want to authenticate as a hosting account, use the cPanel ports (2082 and 2083). For hosting accounts, you would just use standard HTTP authentication using their username and password to perform the authentication.

    If you are not familiar with doing HTTP authentication yourself, there are several samples around the forums but you may wish to consider using a PHP class my colleague, Matt, made for interfacing with our XML API: http://forums.cpanel.net/showthread.php?t=111897
     
  5. madcapchis

    madcapchis Registered

    Joined:
    Sep 30, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page