Skip to content
Download Beeper

Download an asset

assets.download(AssetDownloadParams**kwargs) -> AssetDownloadResponse
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
url: str

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

minLength1
ReturnsExpand Collapse
class AssetDownloadResponse:
error: Optional[str]

Error message if the download failed.

src_url: Optional[str]

Local file URL to the downloaded asset.

Download an asset
from beeper_desktop_api import BeeperDesktop

client = BeeperDesktop(
    access_token="My Access Token",
)
response = client.assets.download(
    url="mxc://example.org/Q4x9CqGz1pB3Oa6XgJ",
)
print(response.error)
{
  "error": "error",
  "srcURL": "srcURL"
}
Returns Examples
{
  "error": "error",
  "srcURL": "srcURL"
}