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.

WHM XML API authentication

Discussion in 'cPanel Developers' started by JamieD, Feb 9, 2008.

  1. JamieD

    JamieD Well-Known Member

    Joined:
    Sep 3, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Am I right in thinking that the only way to authenticate when using the XML API is to send the root username and password? Assuming you want root privileges for your commands of course.

    Is there anything in place to use either an API key or a pre-encrypted password?

    Thanks
    Jamie
     
  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
    There are two methods of authentication: user/pass and user/hash. The user can be root or any reseller account. All API commands will be processed with the privileges available to that user. So if you login as root, you will have root privileges.

    To access the hash (also called the remote access key), go to the WHM interface and in the "Cluster/Remote Access" section click on "Setup Remote Access Key."

    Here's a link to some sample code using the user/hash method of authenticating to the API: http://forums.cpanel.net/showpost.php?p=322538&postcount=6
     
  3. JamieD

    JamieD Well-Known Member

    Joined:
    Sep 3, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Thanks David, works great.
     
Loading...

Share This Page