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.

createacct not working

Discussion in 'cPanel Developers' started by sspitfire, Jan 2, 2014.

  1. sspitfire

    sspitfire Active Member

    Joined:
    Mar 5, 2011
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Hi. Im trying to use the json api to create accounts . When I try to test the string in the browser I get a SSL error:

    "Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.
    Error code: ERR_SSL_PROTOCOL_ERROR"

    I installed a SSL certificate in WHM for this domain but I still get the same error. When i try the same string in SSH as root with lynx I get just this:

    [1] 26545
    [2] 26546

    here is the string Im trying to get to work :

    Code:
    https://domain.com/:2087/json-api/createacct?username=user123&password=h@rd2gu3ss&domain=test1.domain.com
    when I try with the xml api I get this result:

    Code:
    <cpanelresult>
    <error>Access denied</error>
    <data>
    <result>0</result>
    <reason>Access denied</reason>
    </data>
    </cpanelresult> 
     
    #1 sspitfire, Jan 2, 2014
    Last edited: Jan 2, 2014
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    To perform function calls in a browser, you need to first log in to WHM or cPanel to authenticate your session. Make sure you include the security token in the URL. Here is an example of how the URL should look:

    Code:
    https://1.2.3.4:2087/cpsess764675633/json-api/createacct?username=testing1&password=insertpasshere&domain=testing1.com
    This document should also be helpful to you:

    Authenticating API

    Thank you.
     
Loading...

Share This Page