API Endpoint to see if agents are available

답변함

7 댓글

  • Ramin Shokrizadeh
    Zendesk Product Manager

    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

    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
    Zendesk Product Manager

    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

    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

    Well boy howdy. I got a bearer token

    0
  • Kevin

    Do these bearer tokens expire?

    0
  • Brett Bowser
    Zendesk Community Team

    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

댓글을 남기려면 로그인하세요.

Zendesk 제공