polojuni

Member
Sep 19, 2018
7
0
1
Cameroon
cPanel Access Level
Root Administrator
Hello please, I am trying to use the rest API offered by WHM to create a cpanel account. I have created the token and tested a route in the documentation but every route returns me

{"cpanelresult":{"apiversion":"2","error":"Access denied","data":{"reason":"Access denied","result":"0"},"type":"text"}}

Please how to solve this problem
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,276
2,230
363
cPanel Access Level
Root Administrator
Hey there! As a test, can you run this on the command line of the server to ensure that your token is working properly?

Code:
curl -H'Authorization: cpanel username:APITOKEN' 'https://example.com:2083/execute/Module/function?parameter=value'
If that works well, the issue is likely related to something else with the remote connection and not the token.