Quickstart
A two-person video call, end to end. You will create a project, stand up a token endpoint on your server, and join a channel from your app.
Create a project and get your keys
In the console, create a project. You get an App ID and a key pair.
App ID— identifies the project. Safe to ship in your app.API key(ak_…) — identifies the key pair. Server-side.API secret(as_…) — shown once. Server-side only.
The secret is shown once
Store it in your server's environment before you close the dialog. If you lose it, rotate the key — you cannot read it back.
Add a token endpoint to your server
Your app asks this endpoint for a token. This is where you decide who is allowed in, under what identity, and with which role.
import express from 'express';import { AppServerClient } from '@applooma/server-sdk';const app = express();const applooma = new AppServerClient({apiKey: process.env.APPLOOMA_API_KEY,apiSecret: process.env.APPLOOMA_API_SECRET,});app.post('/api/rtc-token', async (req, res) => {// Authenticate YOUR user first — this endpoint is the gate.const user = await authenticate(req);if (!user) return res.status(401).json({ error: 'Sign in first' });const { token, wsUrl } = await applooma.createToken({roomName: req.body.channel,identity: user.id, // must be unique per participantrole: 'host', // 'host' | 'cohost' | 'audience'metadata: { name: user.displayName },});res.json({ token, wsUrl });});app.listen(3001);
Join from your app
Install the SDK for your platform, fetch a token from the endpoint you just built, and join.
import AppEngine from '@applooma/rtc-web';const engine = AppEngine.create({ appId: 'YOUR_APP_ID' });// Show remote video as it arrivesengine.on('track-subscribed', (track, user) => {const el = track.attach();el.id = `peer-${user.uid}`;document.getElementById('remote').append(el);});engine.on('user-left', (user) => {document.getElementById(`peer-${user.uid}`)?.remove();});// Token comes from YOUR serverconst res = await fetch('/api/rtc-token', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({ channel: 'lobby' }),});const { token, wsUrl } = await res.json();await engine.joinChannel(token, wsUrl, { role: 'host', camera: true });// Local previewengine.attachLocalVideo(document.getElementById('local'));
Open it twice
Join the same channel from two browser tabs, or a browser and a phone. You should see and hear the other participant within a second or two.
Nothing appears?
Check that both sides used the same channel name and different identities. Two participants sharing one identity are treated as the same person, and the second connection replaces the first.