Download in Browser

Download in Browser

Sometimes an application wants to embed a file into a page as a HTML element. An example would be when working with an audio player.

<audio controls>
  <source src="..." type="audio/mp3">

In this case, using the regular download URL does not work because the domain does not support Cross Origin Resource Sharing.

Instead an application can use the following format.[FILE_ID]/content?access_token=[ACCESS_TOKEN]


For this to work the application needs to have the domain of the web site hosting this file added to the list of allowed domains in the CORS settings.

Downscope Token

Using this method would expose the Access Token to the end user, allowing them to potentially use this token to do more than intended. For this reason we recommend downscoping this token accordingly.