Need to export end users + all emails (both primary and secondary emails)

3 コメント

  • Pedro Rodrigues
    Community Moderator

    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!

    0
  • Jake Warren

    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. 

    0
  • Pedro Rodrigues
    Community Moderator

    Jake Warren could it be due to pagination?

    0

サインインしてコメントを残してください。

Powered by Zendesk