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.
- Node.js
- Go
- Rust
const participants = await client.participants.list(roomId);
for await (const p of participants) {
console.log(p.participantId, p.name);
}
for p, err := range client.Participants.ListAutoPaging(ctx, roomID, videosdk.ListParams{}) {
if err != nil {
return err
}
fmt.Println(p.ParticipantID, p.Name)
}
use futures_util::StreamExt;
let mut participants = Box::pin(
client
.participants()
.list_stream(room_id, videosdk::ListParams::default()),
);
while let Some(p) = participants.next().await {
let p = p?;
println!("{} {}", p.participant_id, p.name);
}
Get a participant
Returns an error when the room has no live session.
- Node.js
- Go
- Rust
const p = await client.participants.get(roomId, "participant-alice");
p, err := client.Participants.Get(ctx, roomID, "participant-alice")
let p = client.participants().get(room_id, "participant-alice").await?;
Remove a participant
- Node.js
- Go
- Rust
await client.participants.remove(roomId, "participant-alice");
msg, err := client.Participants.Remove(ctx, roomID, "participant-alice")
client.participants().remove(room_id, "participant-alice").await?;
The Participant object
Returned by participants.get and as the items of a participants.list page.
| Field | Type | Description |
|---|---|---|
participantId | string | Unique participant id. |
name | string | Display name, if set. |
timelog | object[] | Join/leave intervals. Each has start and end (end is null while still connected). |
Got a Question? Ask us on discord

