Skip to main content

Comments

5 comments

  • cPanelTJ
    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
  • sisir
    With authorization header it seems to work. BTW, does it mean the doc need to be updated?
    0
  • cPanelTJ
    With authorization header it seems to work. BTW, does it mean the doc need to be updated?

    That's great to hear, sisir. I'm glad you were able to get it working. Regarding updating the documentation, are you referring to adding an example with API token authorization to
    0
  • screwtape
    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
  • cPanelTJ
    @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.