Skip to content
TriedDocs
Calls

Listen to call

Get a listen-only token to hear a live call.

POSThttps://api.tried.com.au/v2/calls/{call_id}/listen

Returns a subscribe-only LiveKit token for a live call, so a supervisor can hear both sides without being heard. The listener joins as a hidden participant. The action is written to the audit log. The listener slot is held for 15 minutes or until Leave call.

Requires the admin or developer role. API keys act as admin.

Request#

Path parameters#

Parameter Type Required Description
call_id string Yes A call that has not ended.

Example request#

curl -X POST "https://api.tried.com.au/v2/calls/call_8d1e0f2a3b4c5d6e7f8a9b0c/listen" \
  -H "Authorization: Bearer $TRIED_API_KEY"
const res = await fetch("https://api.tried.com.au/v2/calls/call_8d1e0f2a3b4c5d6e7f8a9b0c/listen", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const data = await res.json();
import os, requests

res = requests.post(
    "https://api.tried.com.au/v2/calls/call_8d1e0f2a3b4c5d6e7f8a9b0c/listen",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
data = res.json()

Response#

200 OK

{
  "mode": "audio",
  "stream_url": "/v2/calls/call_8d1e0f2a3b4c5d6e7f8a9b0c/stream",
  "livekit_url": "wss://livekit.tried.com.au",
  "access_token": "eyJhbGciOiJIUzI1NiIs..."
}
Field Type Description
mode string audio with a LiveKit token. transcript when LiveKit is in mock mode or the call has no room: follow stream_url for the text instead.
stream_url string Path of the SSE stream for this call.
livekit_url string or null LiveKit URL to join. null in transcript mode.
access_token string or null Listen-only token, valid 1 hour. null in transcript mode.

Audio listening needs LiveKit credentials on the server. Needs keys

Errors#

Status When
400 The call has ended.
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the calls scope. The member role cannot listen.
404 No call with this ID in the workspace.
429 Rate limit exceeded. See Rate limits. The call already has 5 viewers.

See Errors for the body format.