Skip to main content

VideoSDK Server SDK

The VideoSDK Server SDKs provide server-side access to the VideoSDK v2 REST APIs from Node.js, Go, and Rust. All three SDKs offer the same functionality: creating rooms, generating access tokens, managing recordings, HLS and RTMP streams, telephony, and AI agents.

Select your language in any code sample below.

Install

# npm
npm install @videosdk.live/server-sdk

# pnpm
pnpm add @videosdk.live/server-sdk

# yarn
yarn add @videosdk.live/server-sdk

Requires Node.js 18 or later.

Get your credentials

Create an API key and secret in the VideoSDK Dashboard. Pass them to the client, or set them in the environment (see Configuration).

note

Keep your secret on the server. It signs tokens, so it must never reach a browser or mobile app.

Quick start

import { VideoSDK, Grant } from "@videosdk.live/server-sdk";

const client = new VideoSDK({
apiKey: process.env.VIDEOSDK_API_KEY!,
secret: process.env.VIDEOSDK_SECRET!,
});

// Create a room
const room = await client.rooms.create({ geoFence: "us002" });

// Generate a token for your client application to join the room
const token = client
.accessToken()
.setParticipant("user-123")
.grant(Grant.AllowJoin)
.forRoom(room.roomId)
.expiresIn("2h")
.toJwt();

The client signs and attaches its own management token on every request, so you never set an Authorization header for server-side calls.

Capabilities

AreaResources
MeetingsRooms, Sessions, Participants
MediaRecordings, HLS, RTMP, Transcription, Transcodings, WHIP, WHEP, Socket ingest
TelephonySIP, Batch calls, Connectors
AIAgents
WebhooksWebhooks

API reference

Examples

Next steps

Got a Question? Ask us on discord