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


Apr 14, 2010
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.


Well-Known Member
Staff member
Dec 17, 2009
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):