WHM API 1 - Basic Test failing 403
Hello,
I am doing a basic call to whm api 1 by following documentation
NOTE: The api token as root access (double checked). Also check in response the apiversion is 2 so I am gussing the documentation is not upgraded and doing the api call I am calling the version 2 of the api? What I am doing wrong?
NOTE: The api token as root access (double checked). Also check in response the apiversion is 2 so I am gussing the documentation is not upgraded and doing the api call I am calling the version 2 of the api? What I am doing wrong?
-
Hi sisir, Have you authenticated your token in your code? Guide to API Authentication - API Tokens in WHM - Developer Documentation - cPanel Documentation You can also do a quick test using curl through command line to see if your token can access the server and API correctly: curl -H'Authorization: whm root:' 'https://:2087/json-api/accountsummary?api.version=1&user='0 -
With authorization header it seems to work. BTW, does it mean the doc need to be updated? 0 -
Hi I am experiencing the same issues and im using POSTMAN. I just need clarity on the following. 1. Where exactly in the URL should i be placing the token, is it the part in ur example with "1111111..." 2. Please explain what do you mean by Authorization Header. I dont seem to have that option under Authorization 0 -
@screwtape In a general curl request, it should look like: curl -H'Authorization: whm root:' 'https://:2087/json-api/accountsummary?api.version=1&user='
I'm not too familiar with POSTMAN.0
Please sign in to leave a comment.
Comments
5 comments