Access Denied using API to create account

sam.hargreaves

Registered
Oct 25, 2011
2
0
51
cPanel Access Level
DataCenter Provider
Hi,

I'm using the following :

Code:
https://example.com:2087/xml-api/createacct?
username=myuser&
plan=basic%20&
ip=n&
cpmod=x3&
[email protected][email protected]&
contact%20email=username%[email protected]&      <-- "[email protected]"
domain=domain.tld&
useregns=0&
reseller=0
I am however getting an Access Denied error returning in the XML.

Is this the correct code to create an account via the API? Does anything need to be enabled in WHM to use it?

Cheers,
Sam
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
Hello :)

How are you formulating the URL? It should be on a single line. EX:

Code:
/json-api/createacct?api.version=1&username=cptest09&domain=cptest09.com&plan=cp123&cpmod=x3&useregns=0&ip=n&reseller=0&password=123%24%24lug%23ge&contactemail=admin%40cptest09.com
Thank you.