Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

Discussion in 'cPanel Developers' started by ItsssJustice, Sep 6, 2014.

  1. ItsssJustice

    ItsssJustice Registered

    Sep 6, 2014
    Likes Received:
    Trophy Points:
    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?
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    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.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice