Skip to main content

Participants

The participants resource works with a room's live participants. It resolves the room's active session for you, so you pass a room id instead of a session id. For past sessions, use Sessions.

List participants

Returns an empty page when the room has no live session.

const participants = await client.participants.list(roomId);

for await (const p of participants) {
console.log(p.participantId, p.name);
}

Get a participant

Errors when the room has no live session.

const p = await client.participants.get(roomId, "participant-alice");

Remove a participant

await client.participants.remove(roomId, "participant-alice");

See Sessions for the participant shape.

Got a Question? Ask us on discord