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.

Using the UAPI via PHP CURL

Discussion in 'cPanel Developers' started by ag583, Jun 28, 2013.

  1. ag583

    ag583 Registered

    Joined:
    Jan 17, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi there -

    I am attempting to use the SSL functions in the UAPI via CURL from a PHP script. I am having difficulty calling the UAPI using this method and have not been able to get a successful response.

    The cPanel documentation says that the XML/JSON APIs can be used to call UAPI functions - at the bottom of this page.

    Unified API (UAPI) Documentation

    However there is no further documentation on how to actually accomplish this. Any insight?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    35,630
    Likes Received:
    1,136
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you post a snippet of the script you are attempting to utilize UAPI with that is failing? You can find examples at:

    UAPI - SSL

    Thank you.
     
  3. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    191
    Likes Received:
    1
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Did you have any luck with this? I havent been able to connect to it through curl either. Trying to use the root hash for auth. Cpanel has way to many different API's. Its really mess.
     
  4. N1ghteyes

    N1ghteyes Active Member

    Joined:
    Mar 3, 2014
    Messages:
    33
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    Reading, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    i recently ran into the same issues, after a bit of trial / error i got a class working, it doesnt use a hash, it passes the user / pass in the header, but it seems to work pretty well.

    I posted a thread up for it, incase anyone else gets stuck and finds it useful.
    http://forums.cpanel.net/f42/uapi-php-class-417251.html
     
Loading...

Share This Page