Downloading Call Recordings

You might want to download call and voicemail recordings, this gude explains how to do that.

Dialpad Recording Types

Dialpad exposes three types of recordings that show up in the Call object:

  1. Call Recording: Recording of calls taking place between two callers; shows up as type "recording_type": "callrecording".
  2. Voicemail Recording: Recorded voicemail message; shows up as "recording_type": "voicemail".
  3. Admin Call Recording: Recordings that only admins can access; shows up as type "recording_type": "admincallrecording".

Here's an example of how they will show up in the Call object:

// Call Recording
...
"recording_details": [
        {
            "id": "<RECORDING-ID>",
            "recording_type": "callrecording",
            "url": "https://dialpad.com/r/<RECORDING-ID>",
            ...
        }
    ],
...
// Voicemail Recording
...
"recording_details": [
        {
            "id": "<RECORDING-ID>",
            "recording_type": "voicemail",
            "url": "https://dialpad.com/r/<RECORDING-ID>",
            ...
        }
    ],
...
// Admin Call Recording
...
"recording_details": [
        {
            "id": "<RECORDING-ID>",
            "recording_type": "admincallrecording",
            "url": "https://dialpad.com/blob/adminrecording/<RECORDING-ID>.mp3"
            ...
        }
    ],
...

The field recording_details[] is present only when a recording is associated with the call.

Voicemail events may also include voicemail_link and voicemail_recording_id.

See the Call Events documentation for more details.

Downloading Call Recordings

To download most type of call recordings, you have to send an authenticated request to the call recording URLs (except in the case of admin call recording).

The authenticated requests look just like any normal API requests, i.e. with an Authorization header.

The key you supply in the Authorization header needs the recordings_export scope. Successful requests return a file of mime type audio/mpeg.

Save the response as an MP3 or play it in a network-capable player such as VLC

Here are examples of how to download the recordings as MP3.

Call Recordings (callrecording)

These are recordings of completed calls. Their URLs typically look like https://dialpad.com/r/<RECORDING-ID>.

Replace the ID with the one from your payload:

curl -L \
  -H "Authorization: Bearer <DIALPAD_API_KEY>" \
  "https://dialpad.com/r/<RECORDING_ID>" \
  -o call-recording.mp3

Voicemail Recordings (voicemail)

These are audio messages callers leave when a call reaches voicemail. URLs typically look like https://dialpad.com/v/<RECORDING-ID>

Replace the ID with the one from your payload:

curl -L \
  -H "Authorization: Bearer <DIALPAD_API_KEY>" \
  "https://dialpad.com/v/<RECORDING_ID>" \
  -o voicemail.mp3

Admin Call Recordings (admincallrecording)

These are typically formatted as https://dialpad.com/blob/adminrecording/<RECORDING-ID>.mp3.

This one is slightly different because the direct URL you receive via the API is browser-only.

If you tried to download from this direct URL, then the API requests will return an HTML login page rather than audio.

To retrieve an admincallrecording programmatically:

  1. Use the Create Recording Sharelink API to create a Recording Sharelink. Provide the recording ID from the payload, and recording_type: "admincallrecording" as the parameters.
  2. Read the share URL and share-link ID from the response, then make an authenticated request to the returned share URL and save the response as an MP3.

Replace the ID with the one from your payload:

curl --request POST \
     --url https://dialpad.com/api/v2/recordingsharelink \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <DIALPAD_API_KEY>' \
     --header 'content-type: application/json' \
     --data '
    {
      "recording_id": "<RECORDING-ID>",
      "recording_type": "admincallrecording"
    }
    '

// Sample Response
{
  ...
  "access_link":   "https://dialpad.example.com/recording/voicemail/<SHARE-LINK-ID>",
  "id": "<SHARE-LINK-ID>"
  ...
}
curl -L \
  -H "Authorization: Bearer <DIALPAD_API_KEY>" \
  "https://dialpad.com/recording/admincallrecording/<SHARE_LINK_ID>" \
  -o recording.mp3

Bulk Downloading Recordings

At this point, you can only download recordings one by one, but you can combine this with CSV reports generated by Stats API.

You can:

  1. Traverse through the CSV row by row.
  2. Pick the call-id from each row and fetch its details using Get Call API.
  3. Use the recording_details[] field from the response, and follow any of the above methods to download the recordings.




Did this page help you?