I'm trying to establish a websocket connection to web chat using the eventStreamUri I got from this API - https://api.mypurecloud.com/api/v2/webchat/guest/conversations.
I'm using 'ws' package to connect to that uri but not able to in a simple node application.
Please let me know if there are any references to how to create this websocket connection to chat.
Checkout Guest Chat APIs if you haven't already. There is some info there on using web sockets. I'm not sure why you cannot create the web socket connection (you should be able to do this with any standard web socket client using the eventStreamUri). Can you provide more context? What exactly is going wrong when you try to connect?
I've gone through the guest chat doc, thanks. I created a new chat conversation using postman and got the eventStreamUri from the response.
This is the piece of code I'm trying:
It may be an issue with the web socket client you are using. I would suggest trying another web socket client and if the issue persists open a ticket with Genesys Cloud Customer Care.