Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems looking up on email #151

Closed
morindune opened this issue Apr 29, 2019 · 6 comments
Closed

Problems looking up on email #151

morindune opened this issue Apr 29, 2019 · 6 comments

Comments

@morindune
Copy link

Hi,

I have recently been testing out the library, and everything works fine when looking up on ID, however when trying to do a lookup on email (using the sample code) it only returns an empty object, tested with and with out url encoding and on different emails i know exists, doing a simple curl request on the same email works like a charm. Already talked to intercom support, and they suggested I should create an issue here.

Thank you :)
Best Regards,
Silje

@lindeberg
Copy link

I second this.

Intercom.Dotnet.Client 1.0.31

API version
1.2 (2019-05-03)

@phil118
Copy link

phil118 commented Jun 5, 2019

Same here, I updated to latest version of Intercom API to double check and same results as @morindune, empty object but query via a simple curl request it all works ok.

Intercom.Dotnet.Client Version="2.1.0"

API version
1.3 (2019-06-05)

@phil118
Copy link

phil118 commented Jun 5, 2019

It looks like its because the UsersClient tries to return a single user when the client requests to get a user by email, but now according the Intercom API docs it returns multiple users so the deserialization to the User object is failing and needs to be updated to return Users FirstOrDefault() or similar.

As a workaround until it gets fixed you can lookup users using the List endpoint which still works fine

Users users = client.List(new Dictionary<string, string>() { { "email", "[email protected]" } });

@lindeberg
Copy link

Thanks @phil118!

@morindune
Copy link
Author

@phil118 Thank you for the tip on the workaround :D

@lloydliyu
Copy link

Hey @morindune 👋 As mentioned this is due to a change in how we handled searching by email in laster versions of the 1.x API. If you use Version 1.0 you should get a single returned user, however in later versions you get a list, which the SDK isn't expecting.

Related to: #155

We don't have a timeline for the dotnet SDK to be updated to support more recent versions of our API yet. However, if anybody wants to give it a shot and add support, feel free to jump in and leave a note in this issue (#163) issue so we are all aligned and we don't do double work 😃

We'll let you know here when we start working on it. In the meantime, if you need help changing your app version to 1.0 within the Developer hub, feel free to reach out to the support team using the Messenger on https://intercom.com who can help you with the steps on that.

Closing this out as there are over issues that cover this.

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

No branches or pull requests

4 participants