Quickstart

Start integrating Blendlix Call Service into an application safely.

Quickstart

This guide shows the shortest safe path for adding Blendlix Call Service to a web or mobile application.

1. Get product credentials from Blendlix

Ask Blendlix for:

ValueWhere it is used
Product key IDSent by the application backend as X-BCS-Product-Key-ID
Product secretSent by the application backend as X-BCS-Product-Secret
Call Service base URLUsed by the application backend to request session tokens

Keep the product secret on the application backend only. Never put it in a browser app, mobile app, or public JavaScript bundle.

2. Add credentials to the backend environment

BLENDLIX_CALL_BASE_URL=https://rtc-svc.blendlix.com
BLENDLIX_CALL_PRODUCT_KEY_ID=your_key_id
BLENDLIX_CALL_PRODUCT_SECRET=your_secret

3. Create a backend endpoint

A client should not call Blendlix Call Service directly for a token. Instead:

  1. the client asks the application backend for a call session
  2. the backend checks whether the caller is allowed to call the receiver
  3. the backend calls POST /v1/call/session-token
  4. the backend returns the token response to the client

Example backend request to Blendlix Call Service:

POST https://rtc-svc.blendlix.com/v1/call/session-token
Content-Type: application/json
X-BCS-Product-Key-ID: your_key_id
X-BCS-Product-Secret: your_secret
{
  "product": "example_application",
  "role": "caller",
  "user_id": "caller-123",
  "display_name": "Caller One",
  "context_type": "session",
  "context_id": "SESSION-1001",
  "allowed_peer_role": "receiver",
  "permissions": [
    "call:connect",
    "call:invite",
    "call:accept",
    "call:reject",
    "call:cancel",
    "call:end"
  ]
}

4. Connect your client to WebSocket

The token response contains token, ws_url, and ice_servers.

Browser clients should connect like this:

const ws = new WebSocket(tokenResponse.ws_url, ['jwt', tokenResponse.token])

5. Start a call

Send a call.invite event over WebSocket:

{
  "event": "call.invite",
  "request_id": "req-1",
  "data": {
    "callee_user_id": "receiver-456",
    "callee_role": "receiver",
    "context_type": "session",
    "context_id": "SESSION-1001"
  }
}

After the callee accepts, use WebRTC events:

  • webrtc.offer
  • webrtc.answer
  • webrtc.ice_candidate
  1. Architecture
  2. Authentication
  3. API Reference
  4. WebSocket Events
  5. JavaScript SDK Guide
  6. Flutter SDK Guide