Livechat - Auto connect using login of my website
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)
Up @graywolf336 @sampaiodiego
I don't understand what you are trying to do. Can you please restate and clarify what you mean?
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.
I did what I wanted to do :)
@raelsan, how to solve your problem with rocketchat livechat-guests, to example guest-xx as username? thx for your awnser and best Regards
I mean instead of guest-xx the usernamen spend
I'd like to do this as well. How @raelsan solved this situation?
Up for this, still no solution posted.
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 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..
@renatobecker Ok, I Found -> https://rocket.chat/docs/developer-guides/iframe-integration/authentication/#what-is-iframe-auth
@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.