Understanding Session Termination and Link Validity
No Fixed Time Limit: Sessions remain active as long as at least one participant is connected or until manually ended.
Automatic Termination: A session automatically ends 15 seconds after the last participant leaves.
Disconnections: If a user is disconnected (due to internet issues, closing the browser, switching apps, or locking their phone), the system treats it as the user leaving. Users can rejoin while the session remains active. For example, if a client gets disconnected but the agent stays, the client can return and resume the session. However, if the agent leaves after the client, the session will end 15 seconds later.
API-Generated Session Links: If no one joins the session (via leader or follower link) within 120-239 seconds, the session ends, and the links become invalid. This is because we do a polling to check session statistics every 2 minutes.
Manual/Programmatic Termination: Sessions can be ended manually by users or programmatically via APIs at any time. In widget-based (JS API) flows, session events can be used to define custom termination rules, such as ending a session after a specific duration or when an agent disconnects. Additionally, REST API calls can be used—such as in regularly running scripts—to monitor and terminate sessions based on custom logic, regardless of the flow or implementation.