Guest API WebSocket: Handling auth token refresh in custom UI

Building a custom chat UI with the raw WebSocket Guest API instead of the widget. The connection drops after the token expires. What’s the standard flow for refreshing the guest token without killing the existing WebSocket session? Tried reconnecting immediately but it feels hacky.