DeewanDocs
API keys

SDKs

Every Deewan SDK and how to install it: servers (Node, Python), web, React Native, Flutter, iOS and Android.

Deewan has two kinds of SDK. Server SDKs hold your API key and create rooms, join links and tokens. Client SDKs run in the browser or app and put people in the meeting — they never see an API key; your server hands them a join link or a token.

WherePackageInstall
Node, Bun, Deno, edge (server)@deewanio/sdknpm install @deewanio/sdk
Python (server)deewanpip install deewan
Any other server languageHTTPS + JSONOpenAPI 3.1
Browser, custom interface@deewanio/sdk/clientnpm install @deewanio/sdk
React Native / Expo@deewanio/react-nativenpx expo install @deewanio/react-native react-native-webview
Flutterdeewanflutter pub add deewan
iOS (Swift) · Android (Kotlin)The system web viewMobile apps

Node.js server SDK

bash
npm install @deewanio/sdk

Typed, retrying and dependency-free. Works in Node 18+, Bun, Deno and edge runtimes. Server-side only — it carries your API key.

ts
import { Deewan, DeewanError } from "@deewanio/sdk";

const deewan = new Deewan({
  apiKey: process.env.DEEWAN_API_KEY!,
  timeout: 15_000,  // per request, ms
  maxRetries: 2,    // for 429 and 5xx on safe requests
});

try {
  for await (const room of deewan.rooms.all()) {
    console.log(room.name, room.url);
  }
} catch (error) {
  if (error instanceof DeewanError) {
    console.error(error.status, error.code, error.message, error.requestId);
  }
}

Methods

NodePythonEndpoint
me()me()GET /me
rooms.list() · rooms.all()rooms.list() · rooms.all()GET /rooms
rooms.create() · retrieve() · update() · delete()same names/rooms, /rooms/{id}
rooms.createJoinLink()rooms.create_join_link()POST /rooms/{id}/join-links
rooms.createToken()rooms.create_token()POST /rooms/{id}/tokens
rooms.listParticipants() · muteParticipant() · removeParticipant() · end()list_participants() · mute_participant() · remove_participant() · end()/rooms/{id}/participants, /end
rooms.makeCohost() · removeCohost()make_cohost() · remove_cohost()/rooms/{id}/participants/{identity}/cohost
rooms.inviteToSpeak() · moveToAudience()invite_to_speak() · move_to_audience()/rooms/{id}/participants/{identity}/stage
rooms.listWaiting() · admit() · deny()list_waiting() · admit() · deny()/rooms/{id}/waiting
meetings.list() · create() · retrieve() · update() · cancel()same names/meetings
polls.list() · create() · close() · reopen() · delete()same names/rooms/{id}/polls, /polls/{id}
breakouts.get() · start() · move() · announce() · end()same names/rooms/{id}/breakouts
breakouts.addRoom() · renameRoom() · removeRoom()add_room() · rename_room() · remove_room()/rooms/{id}/breakouts/rooms
recordings.list() · retrieve() · downloadInfo() · download() · delete()list() · retrieve() · download_info() · download() · delete()/recordings
webhooks.list() · create() · update() · delete() · test() · deliveries()same names/webhooks
verifyWebhook(raw, header, secret)verify_webhook(raw, header, secret)Checks a webhook signature

Python server SDK

bash
pip install deewan
# Only if you download recordings (decrypts them on your server):
pip install "deewan[recordings]"

Python 3.9+, no dependencies (the standard library's HTTP client). Same timeouts, retries and errors as the Node SDK; it refuses redirects and plain http, so your key only ever goes to Deewan.

python
import os
from deewan import Deewan, DeewanError

deewan = Deewan(os.environ["DEEWAN_API_KEY"])

room = deewan.rooms.create(name="Onboarding call")
link = deewan.rooms.create_join_link(
    room["id"], name="Sara", role="host",
    redirect_url="https://app.example.com/done",
)
print(link["url"])

try:
    deewan.rooms.retrieve("missing")
except DeewanError as error:
    print(error.status, error.code, error.message, error.request_id)
Verify a webhook (Flask)
from deewan import DeewanError, verify_webhook

@app.post("/deewan/webhooks")
def deewan_webhook():
    try:
        event = verify_webhook(request.get_data(), request.headers.get("Deewan-Signature"), os.environ["DEEWAN_WEBHOOK_SECRET"])
    except DeewanError:
        return "", 400
    print(event["type"], event["data"])
    return "", 204

Browser client

bash
npm install @deewanio/sdk

For custom interfaces: connects with a media token, turns on end-to-end encryption, and gives you everything a participant can do in Deewan's own interface. The React Native and Flutter SDKs have the same methods and events, and everyone interoperates with people in Deewan's own apps.

You want to…CallOthers see it as
Camera, microphone, screensetCamera · setMicrophone · setScreenShare · useDevicetrackSubscribed, participants
Chat and reactionssendMessage · sendReactionmessage · reaction
Raise a handraiseHand(true | false)handRaised, handRaisedAt
Answer a pollpolls() · vote(pollId, optionIds)pollsChanged
Live captions for yousetCaptions(true)caption lines
Webinar Q&Aask · voteQuestion · hosts: markQuestionquestions
Know about recordingrecordingrecording event
Breakout announcements—announcement
Strict roomsexchangeKey() before the tokensecurity (the code to compare)
A strict room with your own interface
import { exchangeKey, joinMeeting } from "@deewanio/sdk/client";

// 1. In the browser: this page's public exchange key (the private half never leaves it).
const key = await exchangeKey();

// 2. Your server asks for the token with it (never put an API key in the browser).
const token = await (await fetch("/api/meeting-token", { method: "POST", body: JSON.stringify({ key }) })).json();
//    server: await deewan.rooms.createToken(roomId, { name, exchange_key: key })

// 3. Join. The meeting key arrives from the people already inside.
const meeting = await joinMeeting(token);
meeting.on("security", ({ ready, code }) => ready && showCode(code)); // same code on every screen
meeting.on("trackSubscribed", ({ attach }) => attach(document.createElement("video")));
await meeting.raiseHand();

These participant actions go through the Participant API, authenticated by the participant's own room token rather than your API key, so they are safe from a browser or an app. Host powers (muting or removing people, the stage, breakouts, recording) stay on your server.

Participants are plain objects: id, name, isSelf, isHost, isCohost, isGuest, micOn, camOn, isScreenSharing, isSpeaking, handRaised, handRaisedAt, captionsOn, onStage and isAudience. Events: participants, trackSubscribed, trackUnsubscribed, message, reaction, pollsChanged, caption, questions, recording, announcement, security, kindChanged and disconnected (left, removed, ended or error). A new trackSubscribed listener also receives every track already playing. Flutter exposes the same events as streams (messages, pollChanges, captions, questionChanges, recordingChanges, announcements, securityChanges).

Security built in: tokens and keys only travel over HTTPS/WSS (plain http is refused except to localhost), participant actions are authorized by each person's own room token, and in strict rooms the meeting key never leaves participants' devices.

React Native, Flutter, iOS and Android

See Mobile apps: embed Deewan's meeting with one component, or join with a token and draw your own screens.

Chat and calls

The same packages carry chat and ringing calls between your own users: on the server deewan.users, channels, messages and calls (Node and Python), in the browser connectChat from @deewanio/sdk/client, on phones @deewanio/react-native/chat and package:deewan/chat.dart. See Chat and calls.

Other languages

The API is plain HTTPS + JSON with a bearer key, so any language works (Go, PHP, Ruby, Java, .NET…). Generate a typed client from the OpenAPI document, or call it directly:

bash
curl -X POST https://deewan.io/api/v1/rooms/ROOM_ID/join-links \
  -H "Authorization: Bearer $DEEWAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Sara", "role": "host"}'