(legacy) getMediaDownloadURL

Last Updated 5 years ago

Note that the XML-RPC API is a legacy API and is no longer being developed, we recommend using the REST API instead.

The XML-RPC API provides 2 similar calls to retrieve URLs pointing to media. getMediaContentURL should only be used to fetch links for streaming. When you want to retrieve a link to a downloadable file, you have to use getMediaDownloadURL.

Description

Usage getMediaDownloadURL(common, mediaid, period, trackingid, options)
period The number of seconds that this link should remain valid. If a value of zero is supplied, the link will always be valid and never expire (type int).
ttrackingid A positive integer used to track the usage of the returned download link. Instances where no special tracking is required, such as on the main client site, should use zero. Allocation of other tracking ids is left at the client's discretion. The maximum allowed id is 1,000,000 (type int).
options

A struct with options and corresponding values (type struct).
Use the key ‘filename’ to set the filename offered by the browser when opening the link. (type string).
When no 'source' key is present in options, highest-bitrate transcoded format is returned. Set the key 'source' to get a link to download the source (uploaded) copy if it exists.

Use the key ‘userip’ to restrict accessing the download only from the specified end user IP address (only IPv4 addresses of the format ‘1.2.3.4’).

Returns A URL to the media file (type string).
Error codes 432, 433
This website relies on cookies to function, but no personal data is ever stored in the cookies.
OK

Loading ...