Download Media

Downloads a media file you previously uploaded.

Request URL


⚠️ Caution on fetching Media ⚠️

You MUST use your API token and secret to download the media each and every time you want to access the file. We DO NOT recommend using Bandwidth's url to display/stream media files to your end-users. Providing your user-id, token, and secret to users' devices is a security risk, as they could use your credentials to access your account.

Instead, we recommend that you create a copy on your local server or a cloud storage service. Doing so allows you to specify YOUR authentication method (if any) to keep your Bandwidth account and users safe.

Example 1 of 1: Download an MP3 File

curl -v -X GET{userId}/media/{mediaName} \
    -u {token}:{secret} \"file.mp3").
then(function (media) {
using(var data = await client.Media.DownloadAsync("file.mp3"))
  var fileContent = await data.ReadAsStreamAsync();
  // fileContent is stream object
content, media_type =, "file.mp3")

results matching ""

    No results matching ""