We created a widget and the web chat is working, but when the client in the chat open a session and he is waiting for some agent to connect with him, after 10~15 minutes waiting, the session is closed.
My doubt is if there is a way to reconnect the session again, and if in the widget we have some parameter that we can set the timeout for the session.
At this time, there are no parameters you can set on the PureCloud Admin side to modify the duration of timers.
As far as I know, there are 2 timeouts involved.
If your websocket closes or fails to respond (client side), the server will terminate the chat session after a couple of minutes.
No activity auto-disconnect While connected to an agent, if the guest does not send any messages for 15 minutes, the guest will be automatically disconnected. This timeout only applies while connected to an agent; activity is not required from the guest while waiting in queue.
You can also try to reconnect your session, using the same values you received in the Create Chat Response (id, jwt, eventStreamUri, member.id).
You just have to skip the Create a new chat request and proceed to the creation of your web socket and the use of Guest Chat API requests. You can possibly start with one of the API requests first (like getting members of the chat conversation) so that if the chat session has been ended/terminated, you will be notified in the API response. If the chat session has not been terminated by the server, you should be able to reconnect.