Get a media file's content
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/Media/Byte/1042';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.siprtc.io/v1/Accounts/AC000000000000000000/Media/Byte/1042 \ --header 'Authorization: Basic <credentials>'Returns a media item’s original file inline: the url field holds the file’s bytes, base64-encoded. You can read your own items and global items of your parent account. id is 0. Files are at most 10 MB, so the JSON body can reach about 14 MB.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Your account’s Auth ID (20 upper-case letters and digits).
Example
AC000000000000000000Media id.
Example
1042Responses
Section titled “ Responses ”File content.
object
MIME type declared at upload.
Free-text description.
Document name.
Document type label.
Storage key of the file.
Always 0.
Omitted.
The original file’s bytes, base64-encoded (despite the field name).
Random UUID of the media item.
Example
{ "content_type": "application/pdf", "docdescription": "Contract for signature", "docname": "contract-2026-11", "doctype": "pdf", "filename": "AC000000000000000000/11-2026/7f3c2a9e-4b1d-4c8e-9a61-2d5f0b8e1c34-contract.pdf", "id": 0, "url": "JVBERi0xLjcK", "uuid": "7f3c2a9e-4b1d-4c8e-9a61-2d5f0b8e1c34"}Malformed media id (message ‘invalid media_id’).
object
Human-readable reason.
Always “failed”.
Example
{ "message": "fax not found", "status": "failed"}Missing or wrong credentials, or credentials that may not act for {auth_id}. Body: ‘Authentication failed’.
Example generated
exampleNo such media item visible to this account (message ‘media not found’).
object
Human-readable reason.
Always “failed”.
Example
{ "message": "fax not found", "status": "failed"}The file could not be read (message ‘media request failed’).
object
Human-readable reason.
Always “failed”.
Example
{ "message": "fax not found", "status": "failed"}