Zendesk API throwing 401:Unauthorized error

Answered

4 Comments

  • Bryan - Community Manager
    Comment actions Permalink

    Hi Pkulkarni. If your using the <email>/token format make sure that you are passing an "API Token" (as described here Authentication for API requests and here Generating a new API token).

    Please review these articles for more details. If you are following these instructions, then perhaps opening a ticket with us at support@zendesk.com is the best next step. We can go through a more detailed review of what you're doing and not expose any sensitive info here in the Community forum.

    0
  • Chi Hoang
    Comment actions Permalink

    Bryan,

    I had same issue. I followed your instruction, added API token.  Re-run the script and it work.

    My question is why does it work without passing the token id in the script?

    I have opened a ticket with Zendesk but Agent refused to help with script.  All he gave me was the curl command.

    Thanks for your time.

    0
  • Joey
    Comment actions Permalink

    Hi Chi-

    I'm not quite sure what you mean by this:

    My question is why does it work without passing the token id in the script?

    Can you explain?

    0
  • Chi Hoang
    Comment actions Permalink

    I have scripts that running for years. Last ran on 10-6. I submitted ticket but not much help from tier 1.

    I read this post and followed the response from Bryan.  Add new API token and re-ran the script with NO changes and it works.  

    0

Please sign in to leave a comment.

Powered by Zendesk