Rooms
A room is the container for a meeting. Create one, then give its room id and a participant token to your client app to join. All room operations are on the rooms resource.
Create a room
- Node.js
- Go
const room = await client.rooms.create({ geoFence: "us002" });
room.roomId; // "abcd-efgh-ijkl"
room, err := client.Rooms.Create(ctx, videosdk.RoomCreateParams{
GeoFence: videosdk.String(videosdk.RegionUS002),
})
Reusing a customRoomId returns the existing room instead of creating a new one, so you can key rooms to records in your own database.
| Option | Type | Description |
|---|---|---|
customRoomId | string | Your own id. Creation is idempotent on it. |
geoFence | string | Region to pin the room to (us002, eu001, in002, …). |
webhook | object | Webhook for this room's session events (url, events). |
autoCloseConfig | object | Close the session automatically after inactivity. |
autoStartConfig | object | Start recording or HLS automatically when the session begins. |
allowedParticipantIds | string[] | Restrict who may join. |
To start recording on the first join, pass autoStartConfig:
- Node.js
- Go
await client.rooms.create({
autoStartConfig: {
recording: {
config: { layout: { type: "GRID" } },
transcription: { enabled: true },
},
},
});
room, err := client.Rooms.Create(ctx, videosdk.RoomCreateParams{
AutoStartConfig: &videosdk.AutoStartConfig{
Recording: map[string]any{
"config": map[string]any{"layout": map[string]any{"type": "GRID"}},
"transcription": map[string]any{"enabled": true},
},
},
})
List rooms
Returns a page you can iterate across all pages.
- Node.js
- Go
for await (const room of await client.rooms.list()) {
console.log(room.roomId, room.createdAt);
}
for room, err := range client.Rooms.ListAutoPaging(ctx, videosdk.RoomListParams{}) {
if err != nil {
return err
}
fmt.Println(room.RoomID, room.CreatedAt)
}
Filters: query (an exact roomId or customRoomId), plus pagination.
Get a room
- Node.js
- Go
const room = await client.rooms.get("abcd-efgh-ijkl");
room, err := client.Rooms.Get(ctx, "abcd-efgh-ijkl")
Accepts a roomId, internal id, or your customRoomId. Errors if the room doesn't exist.
Validate a room
The same lookup as get, but it never errors on an unknown id; it returns a result you can check. Use it for ids that come from user input.
- Node.js
- Go
const { valid, room } = await client.rooms.validate(roomId);
result, err := client.Rooms.Validate(ctx, roomID)
if result.Valid {
// result.Room is the resolved room
}
End a room
Deactivates the room and ends its live session. Accepts the VideoSDK roomId, not a customRoomId.
- Node.js
- Go
await client.rooms.end("abcd-efgh-ijkl");
room, err := client.Rooms.End(ctx, "abcd-efgh-ijkl")
The Room object
| Field | Type | Description |
|---|---|---|
roomId | string | VideoSDK room id (xxxx-xxxx-xxxx). |
customRoomId | string | Your id, if set. |
geoFence | string | Region. |
disabled | bool | Whether the room has been ended. |
createdAt / updatedAt | string | ISO timestamps. |
Got a Question? Ask us on discord

