Sign inGet Started

Get a leg recording's audio

GET
/v1/voice/legs/{leg_id}/recordings/{recording_id}/audio
const audio = await bird.voice.legs.recordings.audio(
  "vcl_01krdgeqcxet5s7t44vh8rt9mg",
  "vrc_01krdgeqcxet5s7t44vh8rt9mg",
);
console.log(audio.contentType, audio.contentLength);

Redirects to a short-lived URL for this recording's audio.

The bytes live in object storage and are served straight from there, so they never transit the API and no list response carries a link to them. Each request to this operation signs a fresh one.

The response is a 302 whose Location is that pre-authorized storage URL, valid for 15 minutes, so your client must follow redirects. The Authorization header has to be absent from the request that fetches that URL. A client that attaches credentials centrally, at its transport, interceptor or middleware layer rather than per request, re-adds the header on every hop including the redirect, so the storage URL needs a client that carries none. With curl, use version 7.58.0 or later when following the redirect: earlier versions forward custom authorization headers to other hosts.

Treat the URL as secret for as long as it lasts. Anyone holding one can hear the audio.

Audio download is available for 30 days after the source audio starts. The API returns 404 after that cutoff without issuing a storage URL.

An in-progress capture can appear in the inventory with its media stream listed as open. This operation answers 425 while its audio is not ready. If capture metadata is delayed, the recording may not appear immediately. A recording whose capture failed has no audio to serve and answers 404. Its transcript, if one ran, stays readable.

Answers 501 where the workspace's region has no voice media store configured. The audio has nowhere to be read from there.

参数

leg_idstring

The leg the recording belongs to.

recording_idstring

The id of an entry in recordings from listVoiceCallRecordings.

查询参数

dispositionstring

Whether the signed URL plays the audio or saves it. inline, the default, streams it in a browser. attachment asks the browser to save it under a filename naming the recording and when it started.

Possible values: inline, attachment