I'm currently working with Twilio's WebSocket API to handle real-time events in my application. According to the Twilio documentation, I should be receiving WebSocket messages in JSON format, containing types like Connected, Start, Media, Stop, and Mark, each identified by an event property. These messages are crucial for managing the Stream's lifecycle in my application.
However, I've encountered an unexpected message format where the payload contains a base64 encoded UUID ([data: base64 encoded uuid]), which doesn't align with the documented message types or formats I expected based on the Twilio API documentation. This message is received after establishing a WebSocket connection and seems to deviate from the standard Connected, Start, Media, Stop, and Mark messages.
Here are the specifics of what I'm expecting vs. what I'm receiving:
Expected Message Format: JSON string with an event property indicating the type of event (e.g., Connected, Media), and relevant data for handling the event.
Received Message Format: A message with a payload containing [data: base64 encoded uuid] (UUID that is not related to my session or with any of my logic), which does not match any expected event types or data formats.
Based on docs
Has anyone else encountered this type of message format when working with Twilio's WebSocket API?
Note that this handler is working in production envirovment for over year now and haven't got any problem by now.
I've been diging in the Twilio docs for a while and did not found anything yet.