Answered

When calling the intercom API without user details, the messages are still sending the to the latest user

  • 6 June 2021
  • 2 replies
  • 181 views

Hello,

 

I'm working on a react web app, and if the user is logged in, the app is calling the function with the user's data

:  window.Intercom('update', {

        app_id: AP_ID,

        name:...

email..})

 

and when there is no logged in user Im caling the Intercom just with th app_id:

 

window.Intercom('update', {

        app_id: AP_ID})

 

but, still, the messages are sent as the logged-in user,

 

What can I do about it?

 

thanks,

Gy

 

 

icon

Best answer by Roy 7 June 2021, 01:58

View original

2 replies

Userlevel 1
Badge

Hello @gitty GY​ , Welcome to Interconnect.

 

Let me try to help you here, once user is logged out you should call:

Intercom('shutdown');

If you have the Inbox product (combined with another product like Messages) you should call the Intercom shutdown method to clear your users’ conversations anytime they logout of your application. Otherwise, the cookie we use to track who was most recently logged in on a given device or computer will keep these conversations in the Messenger for one week. This method will effectively clear out any user data that you have been passing through the JS API.

 

More information can be found here.

 

Let me know if you have any further question about this topic. Always happy to help.

 

Best,

Roy

Hi @gitty​ 👋

 

@roy s11​ 's answer would work for you here I think. If not, just let us know and we can investigate this further! 😊

Reply