DEVELOPER GUIDE

Your first connection.

RTC provides project-scoped access to real-time voice and video. Your administrator supplies a project API key, API base URL, LiveKit WebSocket URL, and a project active-time budget.

Keep credentials on your backend

Your project key is a secret. Store it in your server environment as RTC_PROJECT_KEY. Set RTC_API_URL to the service origin, including https:// and excluding a trailing slash. Authenticate your app’s users before issuing connection tokens.

Request a participant token

From your trusted backend, send POST /api/token. Attach the project key in the Authorization header. This example uses the host role; issue roles according to your app’s authorization rules.

const response = await fetch(
  process.env.RTC_API_URL + '/api/token',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      Authorization: 'Bearer ' + process.env.RTC_PROJECT_KEY
    },
    body: JSON.stringify({
      roomName: 'hello-world',
      participantName: 'Alex',
      participantIdentity: 'user-123',
      role: 'host'
    })
  }
);
const result = await response.json();
if (!response.ok || !result.success) {
  throw new Error(result.error || 'Unable to join room');
}
// Return only the participant token and connection settings
// to your authenticated client, never the project key.

Connect your client

Use the returned token with your LiveKit client SDK and your supplied LiveKit WebSocket URL. The token already scopes the participant to the project’s namespaced room. The response also includes livekitRoom, the actual room identifier. Do not rebuild the namespace yourself.

The Flutter integration is available in this project as rtc_tracker_sdk. Ask your administrator for the SDK package and a server integration appropriate to your app. Web clients should obtain tokens from their authenticated app backend rather than send the project key directly.

Understand your minute budget

Your project uses one shared timer while at least one participant is connected. Four people connected for fifteen minutes use fifteen project minutes, even across different rooms. The timer pauses when everyone disconnects, preserving unused time for later. A connected participant counts even when silent.

When the budget is exhausted, new tokens are refused and active project participants are disconnected. Your administrator must extend the budget and enable the project to restore access. Enabling alone does not add minutes.

Open consoleTry the usage calculator