abundant-magician-17307
05/08/2025, 2:28 AMtall-airline-16756
05/08/2025, 2:29 AMtall-airline-16756
05/08/2025, 2:29 AMhidden
permission set to true
in the video grant. Here’s how you can do it:
Using LiveKit CLI:
lk token create \
--api-key <key> \
--api-secret <secret> \
--identity <name> \
--room <room_name> \
--join \
--valid-for 1h \
--hidden
Programmatically using a server SDK (Node.js example):
import { AccessToken, VideoGrant } from 'livekit-server-sdk';
const roomName = 'name-of-room';
const participantName = 'user-name';
const at = new AccessToken('api-key', 'secret-key', {
identity: participantName,
});
const videoGrant: VideoGrant = {
room: roomName,
roomJoin: true,
hidden: true
};
at.addGrant(videoGrant);
const token = await at.toJwt();
console.log('access token', token);
This will create a token that allows the user to join a room while being hidden from other participants.
Sources: Authentication | LiveKit Docs