Answered

loginUser fails with "400 user already exists"

  • 27 March 2023
  • 6 replies
  • 515 views

Hello,

 

It seems we cannot reliably use Intercom on iOS due to an API error.

 

We are trying to identify a customer with a uuid, email, and identity hash (derived from the uuid). Our integration was working until we upgraded to the 14 SDK. Now everytime we call either loginUser or updateUser we receive a “400 user already exists” error message. This happens for some users and not others, but is resulting in production customers not being identified.

icon

Best answer by Racheal 29 March 2023, 03:15

View original

6 replies

Also your docs have nothing on this error:

https://developers.intercom.com/installing-intercom/docs/ios-error-codes

Userlevel 4
Badge +5

Hey @Jacob H Racheal from the support engineer team here👋 

 

I’m sorry to hear you are running into this! Are you calling logout() right before this login or update call? I have seen previous customers run into issues by calling logout() directly before registering a user. What happens is, when the user next logs in we see them as already registered because logout never ran. If that is the case, could you test out putting some time between those two calls to see if that improves things and let me know?

@Rachael no we are not. This is upon first login to a fresh app start.

Having same issue as well.

@Racheal It looks like that if we call the loginUser method any other place aside from in the didFinishLaunchingWithOptions  say within our sign in routine, we get the 400 unless we specifically logout before.

Userlevel 4
Badge +5

@Jacob H 

Are you still running into this issue? If so, do you have error logs around this that you can share? Also have you tried updating to version 15 of the SDK? If so, are you still running into the issue?

Reply