Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Livechat - Auto connect using login of my website

Open raelsan opened this issue 9 years ago • 12 comments

Rocket.Chat Version: 0.55.0-develop Running Instances: 1 DB Replicaset OpLog: Disabled Node Version: v4.5.0

Hi !

When I connect to my website (in which there is the livechat), I use the /login api which return a token and the userId. But I'm still connect as guest (when i use the livechat) because of localStorage Meteor.Token and Meteor.userID. I can't modify it because my website and Rocket.Chat are not in the same domain.

Someone has an idea to connect to R.C and use the livechat with this account ?

(Sorry if i made mistakes)

raelsan avatar Apr 18 '17 15:04 raelsan

Up @graywolf336 @sampaiodiego

raelsan avatar Apr 21 '17 11:04 raelsan

I don't understand what you are trying to do. Can you please restate and clarify what you mean?

graywolf336 avatar Apr 25 '17 17:04 graywolf336

I have a web app with your livechat. Customers have to login to access this web app. What I want to do is when they connect to my web app, they are also automatically connected to Rocket.Chat to be identified when they talk with an agent. I tried to use api/v1/login but they are still identified as livechat-guests.

raelsan avatar Apr 26 '17 07:04 raelsan

I did what I wanted to do :)

raelsan avatar Apr 28 '17 13:04 raelsan

@raelsan, how to solve your problem with rocketchat livechat-guests, to example guest-xx as username? thx for your awnser and best Regards

pixtac avatar Aug 11 '17 16:08 pixtac

I mean instead of guest-xx the usernamen spend

pixtac avatar Aug 11 '17 16:08 pixtac

I'd like to do this as well. How @raelsan solved this situation?

leonardothizon avatar May 23 '18 13:05 leonardothizon

Up for this, still no solution posted.

carlo-fontanos avatar Apr 09 '19 05:04 carlo-fontanos

This is pretty easy, you just need to use the right Livechat API method:

https://rocket.chat/docs/developer-guides/livechat-api/#register-visitor

renatobecker-zz avatar Apr 09 '19 13:04 renatobecker-zz

@renatobecker But I want log with existing user in Live chat, not a guest, not a new guest-user... Is this possible? Scenario: Auto create chat roms about my leeds, inside leed dashboard, calling RC api (who will create a new room if not exists) The interage will happen in a Livechat iframe inside my aplication..

salviof avatar Dec 06 '19 15:12 salviof

@renatobecker Ok, I Found -> https://rocket.chat/docs/developer-guides/iframe-integration/authentication/#what-is-iframe-auth

salviof avatar Dec 06 '19 15:12 salviof

@renatobecker But I want log with existing user in Live chat, not a guest, not a new guest-user... Is this possible? Scenario: Auto create chat roms about my leeds, inside leed dashboard, calling RC api (who will create a new room if not exists) The interage will happen in a Livechat iframe inside my aplication..

When you register the guest, they will auto-logged into the Livechat widget. The link you shared above doesn't have any relation with the Livechat. The Livechat users are not regular Rocket.Chat users.

renatobecker-zz avatar Dec 06 '19 15:12 renatobecker-zz