Using OAuth to authenticate Zendesk API requests in a web app

Have more questions? Submit a request

5 Comments

  • Abhinav tuteja
    Comment actions Permalink
    1. By using python
    2. Make a request with a token to a endpoint that will return some device data (period, ssid, password), based on the input (token and device id)
    3. This device data should be used in the rest of the script

    The endpoint to obtain the script data is: https://ahorta.herokuapp.com/sensor?secret=%s&deviceid=%s

    So the device should have a deviceid that will be a given name (like thefirstplant)

     

    Anybody know how to do this plz help

    0
  • Abhilash Sathe
    Comment actions Permalink

    The OAuth mechanism only works for my own subdomain. Doesn't work with other subdomains. Says invalid client id/invalid authorization request.

    0
  • Joey
    Comment actions Permalink

    Hi Abhilash-
    That sounds like expected behavior. A new client would need to be created for a different subdomain.

    0
  • YU-CHENG LI
    Comment actions Permalink

    Hi ZD community,

    I'd like to ask whether there's an example for Zendesk Chat. Because I'm trying to integrate with Dialogflow, this is such an important section that I need to get access_token value. Or is it unnecessary to do it actually?

    Thanks in advance!

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Zendesk Chat allows for an OAuth Authorization Code grant flow as well. Its authorization URL is different (https://www.zopim.com/oauth2/authorizations/new versus https://{subdomain}.zendesk.com/oauth/authorizations/new) but you should be able to follow the same logic as above. See Chat API tutorial: Generating an OAuth token for more details.

    0

Please sign in to leave a comment.

Powered by Zendesk