401 unauthorised for POST /api/v2/requests

3 コメント

  • Ahmed Zaid
    User Group Leader Community Moderator

    Hi James Macpherson,

    There are 2 factors to consider here: authenticated and unauthenticated requests:

    It is true that anonymous requests are allowed and do not need any authentication. However, this needs to be configured in the Admin center > People > Configuration > End users > Anybody can submit a ticket as seen below:


    As for authenticated requests, you mentioned you used a bearer token generated from API token. Not sure what you meant here but need to use basic authentication for API tokens. Only scoped OAuth tokens can be used as a bearer token. More details here.

    I hope that helps.

  • James Macpherson

    Hi Ahmed,

    My settings are Enabled for 'Anybody can submit tickets'

    Thanks for that, I tried the Basic authentication and base64 encoded the following structure:

    jdoe@example.com/token:[REDACTED BY ZENDESK]

    and have also tried without token (just {email}/{password} encoded)

    I'm sending a payload such as:

          "request": {
            "requester": {"name": "Anonymous customer", "email": "james@test.com"},
            "subject": "Help!",
            "comment": {"body": "My printer is on fire!" }

    And now receive a 422 Unprocessable Entity.


  • Greg Katechis
    Zendesk Developer Advocacy

    Hi James! I see that you had a ticket open for this issue and from what I can tell, everything appears to be resolved now. If that's not correct, let me know what you're stuck on!



Powered by Zendesk