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

ItsssJustice

Registered
Sep 6, 2014
1
0
1
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 https://github.com/CpanelInc/xmlapi-php/blob/master/xmlapi.php however when looking at this example https://github.com/CpanelInc/xmlapi-php/blob/master/Examples/createacct_example.php 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?