Skip to main content

Use of the api

Comments

3 comments

  • cPRex Jurassic Moderator
    Hey there! As a test, can you run this on the command line of the server to ensure that your token is working properly? 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.
    0
  • simz8
    I am also having the same problem . i try making a curl call for listing all email accounts, with an API token i've created for one of my cpanel users and i keep getting access denied. I also tried running the call from the command line of the server itself and i get the same error. my call is : curl -H'Authorization: cpanel username:MYTOKEN' '
    0
  • cPRex Jurassic Moderator
    @simz8 - if the issue is happening even from the command line of the same server, that sounds like a problem with the token. Can you try creating a new token and using that for testing and seeing if you get the same issue?
    0

Please sign in to leave a comment.