Skip to content

Conversation

@SonnyCampbell
Copy link

Why?

/user?param=parameters enpoint returns a list of users, not a single user.

Because of this UsersClient.View is broken and always returns an object with all null values unless you search by id because /users/{id} is the endpoint that returns a single user.

How?

When querying by params (ie by user_id={user_id} or email={email}) return {resultObject}.users.FirstOrDefault() instead of {resultObject}

Investigate

I could only test this for the /users/email={email} endpoint, as our user_ids are empty, but I am assuming they work the same way.
Is /users/email={email} supposed to only return a single user? Is THAT the issue here? Or was that updated and the docs/packages werent?
https://developers.intercom.com/intercom-api-reference/reference#view-a-user

…users, so return users.FirstOrDefault from result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant