This page explains what happens inside Livqeno when your app makes a call or sends a message. You don't need it to get started, but it helps you design your app and debug problems. If you haven't yet, read What is Livqeno? first.
The three parts of Livqeno
| Part | What it does | You talk to it with |
|---|---|---|
| Control plane | Stores your projects, environments, API keys, roles, and webhooks. Makes tokens. Sends webhooks. | Your API key, from your backend |
| RTC plane | Carries live audio and video. | An RTC token, from your app |
| Chat plane | Stores and delivers chat messages. | A chat token, from your app |
What happens when a user joins a call
- Your app asks your backend for a token.
- Your backend calls the control plane with its API key:
POST /v1/rooms/{id}/rtc-tokens. - The control plane returns a token, plus the addresses of the media server and relays to use (the grant).
- Your app opens a signaling connection (a WebSocket) to the RTC plane and presents the token.
- The RTC plane checks the token and connects the user to a media server (an SFU). The SFU receives each person's camera and mic and forwards them to everyone else in the room.
- If the user's network blocks a direct connection, media goes through a
TURN relay. That's why you must forward the grant's
iceServersunchanged: they hold the relay details for this user.
Words like SFU, TURN, and signaling are explained in the Glossary.
What happens when a user sends a message
- Your backend makes a chat token for the user:
POST /v1/chat/tokens. - Your app connects to the chat plane over a WebSocket with that token.
- When the user sends a message, the chat plane saves it first, then confirms it to the sender and delivers it to the other members.
- A user who was offline gets what they missed from the saved history.
RTC and chat are separate on purpose
RTC and chat run on different servers, with different tokens.
- Failures stay contained. If chat has a problem, calls keep working, and the other way around.
- You use only what you need. Your app can be calls-only, chat-only, or both.
- Tokens don't cross over. An RTC token doesn't work for chat, and a chat token doesn't work for calls.
The cost: an app that uses both opens two connections. That's expected and small.
How tokens keep your app safe
Only a short-lived token ever reaches a browser or phone. Never your API key.
POST /v1/rooms/{id}/rtc-tokensPOST /v1/chat/tokens- The token expires on its own.
- Your app can't change what it allows. The permissions are signed into it.
- If someone copies a token, they get one user in one room for a short time, not your whole project.
Environments keep test and live data apart
Every project has three environments: development, staging, and production. Each API key belongs to exactly one of them. A development key can never touch production rooms, messages, or webhooks.
A common setup:
| Where your code runs | Which key it uses |
|---|---|
| Your laptop | A development key |
| Your staging server | A staging key |
| Your live server | A production key |
Next steps
- Quickstart: see this whole flow work in 10 minutes.
- Authentication: the full token model.
- Environments: how development, staging, and production stay apart.