Search and update shortcuts | Community
Skip to main content

Search and update shortcuts

  • February 2, 2023
  • 2 replies
  • 0 views

Hello!

My team needs to update 200+ shortcuts to restrict their availability from "All Agents" to just specific departments. So we don't have to do this manually, is there an API endpoint to find all shortcuts that are available to all? I notice this documentation:

https://developer.zendesk.com/api-reference/live-chat/chat-api/shortcuts/#show-shortcut

However when I visit [mysubdomain].zendesk.com/api/v2/shortcuts it seems this endpoint doesn't exist and search definitely isn't an option, the results are:

{"error":"InvalidEndpoint","description":"Not found"}

We aren't set up to use cURL but we can use Python to submit API requests, I was hoping I could write a script to:

- Get the IDs of all the shortcuts that are available to all

- Iterate over them and use the Update endpoint to change the scope to 'department' (How do you specify which department?)

 

Thanks for any suggestions?

2 replies

Eric27
  • February 2, 2023
Hey Rebecca,

The legacy chat endpoints can be found under zopim.com not your subdomain. You can see this in the curl examples and we also talk about it here.

Hope this helps!

  • Author
  • February 2, 2023

Thanks Eric! I'm not able to connect via curl since we don't use passwords to log in but rather SSO. I've been trying with my API token as described here but I keep getting errors (email and token redacted):

curl https://www.zopim.com/api/v2/shortcuts \ -u email@email.com/token:askjdhfajsdfasdfjd

The feedback I get is:

{"error":"Unauthorized","description":"The server could not verify that you are authorized to access the requested resource"}curl: (3) URL using bad/illegal format or missing URL

(3) suggests to me that I have the syntax of this incorrect.

Is it not possible to connect to this end point through API Key? Do I need to create an OAuth key instead? Do I just have the syntax wrong?