Need to export end users + all emails (both primary and secondary emails)
Need a way to export end user data, specifically: name, organization, and all associated emails to the user (both primary and secondaries).
Does anyone happen to know of a way to do this? We've enabled export and tried the list users API endpoint (recommendations from Zendesk Support), but still haven't been able to get all the secondary emails.
-
Hi Jake Warren, try the following endpoint:
https://yoursubdomain.zendesk.com/api/v2/users.json?role[]=end-user&include=identities
This request's JSON output will return end-user data but also something like:
{
"users": [
{
"id": 15152098172817,
"url": "https://yoursubdomain.zendesk.com/api/v2/users/15152098172817.json",
"name": "The Customer",
"email": "customer@example.com",
(...)
"identities": [
{
"url": "https://yoursubdomain.zendesk.com/api/v2/users/15152098172817/identities/15152098175377.json",
"id": 15152098175377,
"user_id": 15152098172817,
"type": "email",
"value": "customer@example.com",
(...)
},
{
"url": "https://yoursubdomain.zendesk.com/api/v2/users/15152098172817/identities/17310769012625.json",
"id": 17310769012625,
"user_id": 15152098172817,
"type": "email",
"value": "customer1@example.com",
(...)With this you should be able to process the data and match each user ID to its identities.
Hope this helps!
-
Hi Pedro Rodrigues - Thanks for helping. Strangely, when I perform this, I don't get nearly the full list of end users we have in our instance. Is it expected to not return this information for all of our users? The results seem like a very small percentage of our overall user population we have set up.
-
Jake Warren could it be due to pagination?
サインインしてコメントを残してください。
3 コメント