OverviewPlatformsAPI ReferenceResources
Voice & Calling

Mint a browser softphone session

POSThttps://zernio.com/api/v1/voice/calls/web

Step 1 of the two-step browser softphone handshake. Mints a WebRTC session (token + credential) the browser registers with the @telnyx/webrtc SDK.

  1. Call this endpoint and register the browser with the returned session.
  2. Once registered, call POST /v1/voice/calls/web/dial with the returned credentialId to place the call.

The split avoids bridging to a browser that has not finished registering. The token lives ~1 hour (it must outlive the whole call, not only the handshake).

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Responses

Success· the request worked

Errors· the request failed

POST/v1/voice/calls/web
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.voice.createVoiceWebSession();console.log(data);
{  "success": true,  "token": "string",  "credentialId": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "sdk": "string"}
OpenAPI specification
Was this page helpful?