great-tiger-31125
12/26/2025, 3:32 PMawait room.localParticipant.sendText(messageText, { topic: 'lk.chat' });
Is there any way doing same from backend, how to send text from my node server to lk room?tall-airline-16756
12/26/2025, 3:32 PMtall-airline-16756
12/26/2025, 3:32 PMlocalParticipant.sendText(...). You can do that from the server using the LiveKit Server SDK’s publishData method — you do not need to join the room as a participant.
Example (Node.js, server-sdk-js):
import { RoomServiceClient } from 'livekit-server-sdk';
const roomService = new RoomServiceClient(
process.env.LIVEKIT_URL,
process.env.LIVEKIT_API_KEY,
process.env.LIVEKIT_API_SECRET
);
// send text to room (room name or SID)
await roomService.publishData(
'Hello from backend',
{ topic: 'lk.chat' },
'your-room-name'
);
What the recipients do:
• Participants receive it via the same data event they use client-side:
room.on('dataReceived', (payload, participant, topic) => {
if (topic === 'lk.chat') {
console.log(payload.toString());
}
});
If you want, tell me:
• the package you’re using (npm package name or version), and
• whether you prefer TypeScript or plain JS — I’ll give a copy-paste-ready snippet and any extra config details. Sources: LiveKit for Robotics | server-sdk-js | livekit/livekit_composite | DeepWiki