Server API Self-serve API

Node.js server client for the Titli REST API

Optional. Quick mode needs no server: the app calls with your App Key. Add this when you want production hardening: your server creates calls, mints join tokens, ends calls, removes or mutes people, reads usage and balance, and verifies signed webhooks and receipts.

Just starting? You do not need this page yet. Add your App Key in the app and make a call in 5 minutes: see the SDKs or the Client API (App Key). Come back for production hardening.

server.js
// server.js (Node 20+), optional production hardening: create a call and hand tokens to your app
import { TitliClient } from 'titli-video-sdk/server'; // npm i titli-video-sdk

const titli = new TitliClient({
  keyId: process.env.TITLI_KEY_ID,
  keySecret: process.env.TITLI_KEY_SECRET,
});

app.post('/api/calls', requireLogin, async (req, res) => {
  const call = await titli.createCall({ type: 'video', payerEndUserId: req.user.id });
  const me = await titli.token(call.id, { endUserId: req.user.id, name: req.user.name });
  const host = await titli.token(call.id, { endUserId: req.body.hostId, role: 'host' });
  // Each person gets only their own token: deliver the host's to the host (push, socket, ...).
  await notifyHost(req.body.hostId, { callId: call.id, url: host.livekit_url, token: host.token });
  res.json({ callId: call.id, url: me.livekit_url, token: me.token });
});
  • Versioned. The version is part of every address, so an update never breaks your integration.
  • Predictable errors. JSON bodies with a machine-readable error code and a message.
  • Node.js client. Our client wraps the account, call, token, participant, usage and receipt endpoints with zero dependencies (Node 20+). It installs from npm, in the same package as the web SDK.
  • Webhook verifier. One function checks the signature and rejects old deliveries.
  • Signed receipts. Ed25519, verifiable with the public key endpoint.
Read the API reference

FAQ

Do I need this server client to make calls?

No. Quick mode needs no server: the app starts calls with your App Key. The server client is the optional production hardening path, for when you want strict control: your server creates each call and hands each person a short-lived token. It is also where the server-only work lives: balance, usage, receipts, webhooks and keys.

How do I authenticate?

HTTP Basic auth with your project key: the key ID (tk_…) as the username and the key secret (ts_…) as the password. Never put the secret in a mobile or web app.

Is there a rate limit?

Yes: 20 requests per second per key, burst 40. Over the limit the request is refused as “too many requests”, and the answer says how many milliseconds to wait before you retry.

Are webhooks signed?

Yes. The Titli-Signature header carries an HMAC-SHA256 over the timestamp and raw body. Each event gets up to 5 delivery attempts, and one that was not delivered can be sent again from the console, up to 5 times a day.

Free SDK. Pay only for the minutes you use.

Create a free account: it starts with ₹100 welcome credit, about 250 minutes of 1:1 video, so your first call needs no recharge. Questions? Message us on WhatsApp and a person replies.

Start free