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.

Does the API work on cPanel-based shared accounts (e.g. cheap hosting at HostGator)

Discussion in 'cPanel Developers' started by kjgraham, Apr 14, 2010.

  1. kjgraham

    kjgraham Registered

    Apr 14, 2010
    Likes Received:
    Trophy Points:
    Hi, I host with HostGator. My script works fine on my reseller whm/cpanel account, but fails when i try it on one of the cheaper cPanel accounts even when I change the port from 2086/7 to 2082/3.

    So my question...does the API work on cPanel-based shared accounts?

    Any suggestions are welcome.
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Dec 17, 2009
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Which API: 1, 2, xml-api?

    What's an example query?

    I doubt that HostGator is restricting/filtering the API calls. I'll presume that you're wanting to utilize the xml-api since you're referencing ports. If so, you can make the applist query and see what function are available to the authenticated user. Most likely it will fail, as the xml-api, or WHM API, functions are designed for resellers and root. That said, you should be able to use the xml-api to perform API1 and API2 module/function calls for any user 'type' if they have the basic functionality. API1 and API2 calls are used all the time in the cPanel interface (x3).

    Example of API2 call using the xml-api. Of course, you first need to login to cPanel as the 'cheap' user. Then try something like this in the browser (replace as need for site/user/domain):


Share This Page