@algoraid/meet
v0.1.0
Published
Typed client for Algora Meet — create/manage video rooms and mint host links via a scoped Algora dashboard API key.
Downloads
17
Maintainers
Readme
@algoraid/meet
Typed client for Algora Meet. Create and manage LiveKit-backed video rooms —
and mint host links — from any first-party service, authenticated with a scoped
Algora dashboard API key. Framework-agnostic (Node 18+, uses global fetch).
Install
npm install @algoraid/meetSetup
In the Algora dashboard go to Settings → Integrations → API keys, create a key with the Algora Meet scope, and copy it once (it's shown only once).
Store it server-side:
ALGORA_MEET_API_URL=https://dashboard.algora.id # the dashboard origin ALGORA_MEET_API_KEY=amk_... # keep this secret
The API key is a server-side secret. Never expose it to a browser bundle.
Usage
import { AlgoraMeetClient } from '@algoraid/meet'
const meet = new AlgoraMeetClient({
baseUrl: process.env.ALGORA_MEET_API_URL!,
apiKey: process.env.ALGORA_MEET_API_KEY!,
})
// Create a room for an interview (idempotent per externalRef).
const room = await meet.createRoom({
title: 'Interview — Frontend Engineer',
externalRef: interviewId,
isPrivate: true, // candidate waits in a lobby until a host admits them
})
// Share room.joinUrl with the candidate (safe — no host powers).
// When a staff member clicks "Join as host", mint a fresh host link:
const { hostUrl } = await meet.createHostLink(room.roomId)
// open hostUrl in the staff member's browser (host key lives in the #fragment).
// Live status:
const status = await meet.getRoom(room.roomId)
// Hard-stop the meeting:
await meet.endRoom(room.roomId)API
| Method | Description |
|---|---|
| createRoom(input) | Create a room (or reuse the live one for externalRef). Returns roomId, meetingId, joinUrl. |
| getRoom(roomName) | Live status: exists, live, participantCount, meetingStartedAt. |
| createHostLink(roomName) | Fresh short-lived host link (hostUrl with the host key in #k=). |
| endRoom(roomName) | Disconnect everyone and invalidate the link. |
All methods throw MeetApiError (.status, .code) on failure. A 503
(code: 'meet_not_configured') means the dashboard's LiveKit env isn't set.
License
MIT
