sspitfire

Active Member
Mar 5, 2011
28
0
51
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&[email protected]&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>
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
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.