how to create requests by end user in javascript use rest api?

2 Comments

  • Sebastiaan Wijchers
    Comment actions Permalink

    Hello Jason,

    Did you check what 'HelpCenter.user.email' and 'API_TOKEN' contain? Seems like the right way to authorize as end user.

    Don't know how your solution is put together, but it will be easy to figure out your API token if this code is client side. In that case you might want to look at anonymous requests:
    https://developer.zendesk.com/rest_api/docs/support/requests#anonymous-requests

    With kind regards,

    Sebastiaan
    Sparkly ⭐

    0
  • Jason Jeong
    Comment actions Permalink

    Hello sebastiaan

    I'm solved this issue

    The solutions are as follows
    1. Get user auth token using users/me.json api
    2. Set user auth token in http request header from 1

    Thank for your reply

    0

Please sign in to leave a comment.

Powered by Zendesk