Fresh Page Load (New Conversation)

  • authorizeSession creates the conversation record when no conversation_id exists and returns a 1-hour client_session_key.
  • The browser client must include a valid bearer token (API key) when proxying to the authorize endpoint.

Page Load With Stored Conversation

  • The SDK automatically reconnects to an existing conversation if a conversationId is cached.
  • To start fresh, create a new client with conversationId = null.
  • Re-authorizing rotates the client_session_key, so old WebSocket URLs stop working once a resume happens.

Network Drop and Manual Reconnect

  • Device listeners, VAD, and amplitude monitors are rebuilt on reconnect.
  • The cached conversationId persists, so the next authorize call resumes seamlessly.
  • To force a fresh run after a drop, instantiate a new client with conversationId = null before reconnecting.