Recent searches


No recent searches

ZenDesk API Retrieve Identities for 3,000+ users



Posted Jan 28, 2021

I have 3,000+ users with primary and secondary emails that I need to validate.   The only way I know how to do this is to API JSON retrieve each user individually and it takes ~30min to run each API request individually.   Is there a better way to retrieve a bulk response of user identities?


0

5

5 comments

Hello,

You can sideload identities with the users endpoint by calling https://subdomain.zendesk.com/api/v2/users.json?include=abilities. You will get 100 records per page. So, you will need to paginate to get the full list of 3000+ users with their identities.

Hope this helps.

Cheers,

Korak

1


This is excellent,  thank you!

0


image avatar

Sydney Neubauer

Zendesk Luminary

I am looking for a way to get a list of all users (particularly agents) with any secondary email addresses they have on their profiles. 

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Sydney,

Unfortunately there isn't a way to do this natively using just the API. That being said, I would approach this by writing a script to do the following:

1. Pull all of the users (or just the agents) from the list users or search endpoint.
2. Take the response and loop through all of the user ids calling the list identities endpoint. If the user has two email identities -> pop their user id into an array to be returned at the end.

Something to keep in mind with this is that you'd want to put some timing restrictions on your script so that you don't run into rate limit issues.
 
Hope this helps,

0


image avatar

Sydney Neubauer

Zendesk Luminary

Eric Nelson thank you for providing that! I guess the problem we run into is that we are wanting to see how does not have a secondary email but I think we can tweak it so do the opposite of step 2

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post