best-battery-56004
10/16/2025, 4:58 PMlivekit (python-sdks) from 1.0.13 to 1.0.16, the room's data_received event handler is not triggered for data send via the Server API. Tested and reproduced the issue using the basic_room.py example. The event handler is triggered for the data sent via python-sdk (room.local_participant.publish_data()). What is causing this issue? Was there any change to required parameters?tall-airline-16756
10/16/2025, 4:58 PMtall-airline-16756
10/16/2025, 4:59 PMdata_received event handler in the LiveKit Python SDK is specifically designed to handle data packets sent by participants over WebRTC using send_data(). I understand it can be a bit confusing, but data sent via the Server API doesn’t go through the WebRTC data channel, so it won’t trigger the data_received event.
Here are a few friendly suggestions to help you along:
• Try using webhooks to capture server-side events and data—this is the best way to handle data sent via the Server API.
• If you want to trigger the data_received event, you might want to explore the Agent SDK, which lets you create a server-side participant that sends data over WebRTC.
• For more structured communication, text streams or byte streams could be great options to consider.
Please don’t hesitate to reach out if you’d like any help implementing these solutions—I’m here to support you every step of the way!
Sources: Webhooks | LiveKit Docs | livekit-protocol/livekit/protocol/models.py | Server-Side SDKs & Authentication | livekit/livekit_composite | DeepWiki | Sending text | LiveKit Docs | Sending files & bytes | LiveKit Docsbest-battery-56004
10/16/2025, 5:34 PMtall-airline-16756
10/16/2025, 5:34 PMSendData Server API! It's a powerful tool designed to send individual packets of data to one or more participants within a room. It gives you advanced control over how your data is delivered, including options for reliable or lossy transmission, and lets you target specific participants using their SIDs or identities.
That said, this API is a bit low-level and works best when you need precise control over data behavior. For example, it’s great for:
• Sending in-room chat messages where reliable delivery is important
• Broadcasting real-time updates when speed is key
• Targeting specific participants with custom data
For most other situations, though, LiveKit suggests using higher-level APIs like text streams, byte streams, or RPC. These options make development smoother and handle many common scenarios more efficiently. If you’d like, I’m here to help guide you through implementing any of these approaches—just let me know!
Sources: livekit/livekit_room.pb.go | packages/livekit-server-sdk/src/RoomServiceClient.ts | livekit-protocol/src/livekit.rs | Data packets | LiveKit Docs