Need a little bit of advice and help integrating the cPanel API(s)


Sep 6, 2014
Bishops Stortford, United Kingdom
cPanel Access Level
Website Owner
I've been looking for a few days on your forums and can't seem to find relevant information regarding what I'm attempting to do.

Essentially what I'm trying to do is: Allow a user to change their account password on my website. If they have an email account on my hosting (already dealt with), then I'd like to change their email password (problem) at the same time. I'd like this to be done completely as a background process if possible (showing none of the cPanel to the user who is changing the password).

I think I have to use the XML-api but I'm not completely sure. I've tried implementing this by downloading and including the xmlapi.php from however when looking at this example it seems like I have to have root access to the server to use the api? (Which I don't - I'm on shared hosting and only have access to edit settings based on my own website)

I've found the function I believe I need to use which is "Email::passwdpop" from api 1, however if I'm correct, you call api 1 from the xml api? (from looking at Email Module Documentation)

Could you point me in the right direction if I am using the wrong api or am implementing it incorrectly?


Staff member
Apr 11, 2011

Root credentials are not required for API 1 or API 2, but I suggest using API 2. The following documents should help you get started:

cPanel API2 Functions
API2 PHP Example

If possible, see if your provider can enable the "API Shell" feature on your account, as that is often a helpful utility.

Thank you.