Download a file
client.assets.download(AssetDownloadParams { url } body, RequestOptionsoptions?): AssetDownloadResponse { error, srcURL }
POST/v1/assets/download
Download a file from an mxc:// or localmxc:// URL to the device running the Beeper Client API and return the local file URL.
Download a file
import BeeperDesktop from '@beeper/desktop-api';
const client = new BeeperDesktop({
accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted
});
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"
}