Skip to main content

Participants

The participants resource works with a room's live participants. It resolves the room's active session automatically, so you pass a room id rather than 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

Returns an error 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");

The Participant object

Returned by participants.get and as the items of a participants.list page.

FieldTypeDescription
participantIdstringUnique participant id.
namestringDisplay name, if set.
timelogobject[]Join/leave intervals. Each has start and end (end is null while still connected).

Got a Question? Ask us on discord