Skip to content
  • Auto
  • Light
  • Dark
Download Beeper

Download

Download an asset
client.assets.download(AssetDownloadParams { url } body, RequestOptionsoptions?): AssetDownloadResponse { error, srcURL }
post/v1/assets/download

Download a Matrix asset using its mxc:// or localmxc:// URL to the device running Beeper Desktop and return the local file URL.

ParametersExpand Collapse
body: AssetDownloadParams { url }
url: string

Matrix content URL (mxc:// or localmxc://) for the asset to download.

minLength1
ReturnsExpand Collapse
AssetDownloadResponse { error, srcURL }
error?: string

Error message if the download failed.

srcURL?: string

Local file URL to the downloaded asset.

Download an asset
import BeeperDesktop from '@beeper/desktop-api';

const client = new BeeperDesktop({
  accessToken: 'My Access Token',
});

const response = await client.assets.download({ url: 'mxc://example.org/Q4x9CqGz1pB3Oa6XgJ' });

console.log(response.error);
{
  "error": "error",
  "srcURL": "srcURL"
}
Returns Examples
{
  "error": "error",
  "srcURL": "srcURL"
}