Trying to pull data for an end_user after knowing his ID | Community
Skip to main content

Trying to pull data for an end_user after knowing his ID

  • July 20, 2021
  • 3 replies
  • 0 views

Hi,

I'm a little bit stuck, been trying to get email list from Zendesk for all our users, the only way I found so far is to pull user id list and use that list with a get end_users command.

I have been trying to test it with the curl command for testing but something is missing.

I replaced the domain, email and password for security reasons.

curl https://{domain}.zendesk.com/api/v2/end_users/369312547338\

-v -u {email}:{password}

 

"error": {
"title": "Invalid attribute",
"message": "You passed an invalid value for the id attribute. Invalid parameter: id must be an integer from api/v2/end_users/show"

This topic has been closed for replies.

3 replies

  • July 20, 2021

I'm wondering if perhaps you're seeing this error since there isn't a space in between "369312547338" and the "\"

Based on the example found in Zendesk's API docs, it looks like it should be: curl https://{domain}.zendesk.com/api/v2/end_users/369312547338 \ instead.


  • Author
  • July 21, 2021

Hi Chandra,

You are correct, but when I try to send it with space I get an error and when I try to omit "\" I also get a long error with a bottom line that says.

{"error":"RecordNotFound","description":"Not found"}* Closing connection 0

 

Now, I'm sure that the ID number I have is of a user found in the system, but for some reason it's given me an error that the record is not found.

I got the ID after pulling out the list from 

curl https://{subdomain}.zendesk.com/api/v2/users.json \ -v -u {email_address}:{password}

Ok I think I understand why I couldn't access it, only end users are able to access their own information

https://developer.zendesk.com/api-reference/ticketing/users/end_user/

Allowed for

  • End users

 

Is there a way I can also pull their info? if I have Admin rights, it is only making sense that I will but it doesn't seem as easy...

 


  • Author
  • July 21, 2021

ok I managed to do it via

  • GET /api/v2/organizations/{organization_id}/users

That's good enough for me.