API Endpoint to see if agents are available

Answered

7 Comments

  • Ramin Shokrizadeh
    Comment actions Permalink

    Hi Kevin,

    Not sure what you are trying to build, but you can use the real time APIs to get the number of agents by status: https://developer.zendesk.com/rest_api/docs/chat/apis#agent-metrics

    Based on that information, you can choose to do whatever you want in your app. 

    -Ramin

     

    0
  • Kevin
    Comment actions Permalink

    Thanks Ramin! This is precisely what I was looking for. Am I able to call the REST API without going through the whole Oauth process? 

     

    I created an API token in https://chaz.zendesk.com/agent/admin/api/settings/tokens and added it here, but I still get a 401 unauthorized response. Not sure what I'm doing wrong.

    curl https://rtm.zopim.com/stream/agents \
      -H "Authorization: Bearer {API access token}"
    0
  • Ramin Shokrizadeh
    Comment actions Permalink

    For the Chat REST APIs, you need to use OAuth and basic auth is not supported for all account types.

    You created an OAuth client for the Support product, you need to create one inside the Chat dashboard in Settings---Account---API & SDKs.

    -Ramin

    0
  • Kevin
    Comment actions Permalink

    Thanks Ramin for your help and taking a look into our account specifically. I really appreciate that. My morning will be spent trying to get this to work.

    0
  • Kevin
    Comment actions Permalink

    Well boy howdy. I got a bearer token

    0
  • Kevin
    Comment actions Permalink

    Do these bearer tokens expire?

    0
  • Brett - Community Manager
    Comment actions Permalink

    Hey Kevin,

    The bearer token will not expire unless you were to revoke the token yourself. More information here: Revoke Token

    Hope this helps!

    0

Please sign in to leave a comment.

Powered by Zendesk