adorable-engine-68435
10/26/2025, 6:40 AMtall-airline-16756
10/26/2025, 6:40 AMtall-airline-16756
10/26/2025, 6:41 AMCreateRoom API and simply include the metadata field. Here's a quick example:
// Node.js Example
await roomService.createRoom({
name: 'my-room',
metadata: JSON.stringify({ theme: "dark", accessLevel: "premium" })
});
• After Room Creation: If you want to update the metadata later, you can use the UpdateRoomMetadata API to change it dynamically. For instance:
// Node.js Example
await roomService.updateRoomMetadata('my-room', JSON.stringify({ theme: "light", accessLevel: "basic" }));
Just a quick note: room metadata has a limit of 64 KiB and is shared with participants through the RoomMetadataChanged event. If you'd like, I’m here to provide more details or examples—just let me know!
Sources: Core Platform Architecture & Authentication | livekit/livekit_composite | D... | Room metadata | LiveKit Docs | packages/livekit-server-sdk/src/RoomServiceClient.ts | livekit-api/livekit/api/room_service.pyadorable-engine-68435
10/26/2025, 8:10 AMtall-airline-16756
10/26/2025, 8:12 AMCreateRoom API. Let me walk you through an example using the Node.js SDK:
`import { RoomServiceClient } from 'livekit-server-sdk';
const client = new RoomServiceClient('', 'API_KEY', 'API_SECRET');
await client.createRoom({
name: 'my-room',
emptyTimeout: 300, // Keep room open for 5 minutes before first participant
departureTimeout: 300, // Keep room open for 5 minutes after last participant leaves
maxParticipants: 50, // Limit participants to 50
metadata: JSON.stringify({ // Store attributes as JSON in metadata
category: "meeting",
department: "engineering",
priority: "high"
})
});`
Just a quick note: room metadata is stored as a single string, so using JSON is a great way to keep your structured data organized. And if you ever need to update this information, you can easily do so with the `UpdateRoomMetadata` API.
If you’d like, I’m here to help with more examples or guide you through using a different SDK. Just let me know! Sources: livekit-api/livekit/api/room_service.py | README.md | Rooms, participants, and tracks | LiveKit Docs | packages/livekit-server-sdk/src/AccessToken.ts | examples/api/src/main.rs