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.

Need suggestion for how to interface with APIs for email functions

Discussion in 'cPanel Developers' started by scallas, Mar 19, 2012.

  1. scallas

    scallas Registered

    Joined:
    Mar 19, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm a php developer that is new to working with cPanel's APIs. I am looking to create a plugin for a CMS system that enables logged in users to make changes to their email accounts. Specifically, I want users to be able to add and delete email accounts and change passwords on those email accounts. I need to be able to list the email accounts in the management page in the CMS.

    Can anyone recommend the best way to interface with the API's to accomplish those items (xmlapi.php, PublicAPI, via url in php script, something else ....)? And, is there a "quick start" guide to show one how to use it? (Thus far, all the documentation that I have seen hasn't helped in showing the first few steps to getting a script running for a first timer, though they seem excellent in providing info for the experienced user.)

    Thanks!
     
  2. BlaineM.

    BlaineM. cPanel QA Analyst
    Staff Member

    Joined:
    Apr 4, 2011
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Greetings,

    My suggestion would be to use the cPanel XMLAPI.php class, since it essentially does all of the backend work for you. The php class, plus an examples folder, are located at our Github page

    Also, our documentation about the API usage through API isn't exactly a quick start guide, but it does explain a few details you wouldn't normally find elsewhere.

    I think if you modify the examples at our Github account, using the knowledge from our documentation, you should be set.
     
  3. scallas

    scallas Registered

    Joined:
    Mar 19, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you! That does help. For some reason I couldn't actually find the xmlapi.php download, and yet saw lots of posts about using it - often with dead links to the xmlapi.php class.

    Seeing the examples gets me a long way down the road, too!

    Cheers,
    Scallas
     
  4. BlaineM.

    BlaineM. cPanel QA Analyst
    Staff Member

    Joined:
    Apr 4, 2011
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Glad to help :)
     
Loading...

Share This Page