Part 3: Using Zendesk APIs

Have more questions? Submit a request

2 Comments

  • Matthew Hammond
    Comment actions Permalink

    Hi, I created a basic javascript request to 'users/create_or_update.json'.

    However the request keeps sending a 401 response. Which is an unauthorised request, therefore I added "authorization" header to my request. I have used both email:password and email/token:KEY yet both still return the same 401.

    Please could you update your post to include a request which requires authorisation as I cannot seem to get past this error?

    0
  • Joey
    Comment actions Permalink

    Hi Matthew-

    If I am not mistaken, the 'Authorization' header should have a value of "Basic" followed by the base64 encoded value of your email/pwd combination. For example, the combination of 'user@example.com:12345' has a base64 encoded value of dXNlckBleGFtcGxlLmNvbToxMjM0NQ==. My authorization header would look like this:
    'Authorization': 'Basic dXNlckBleGFtcGxlLmNvbToxMjM0NQ=='

    0

Please sign in to leave a comment.

Powered by Zendesk