Skip to main content
POST
Download file from a message

Authorizations

token
string
header
required

Body

application/json
id
string
required

ID of the message containing the file

Example:

"7EB0F01D7244B421048F0706368376E0"

return_base64
boolean
default:false

Includes the content in base64. Avoid for large files; future versions may limit files larger than 5 MB

generate_mp3
boolean
default:true

For audio, defines return format (true=MP3, false=OGG)

Kept for compatibility. The public URL is always returned in fileURL

transcribe
boolean
default:false

If true, transcribes audio to text

openai_apikey
string

OpenAI API Key for transcription (optional)

Example:

"sk-..."

download_quoted
boolean
default:false

If true, downloads media from the quoted message instead of the main message

Response

Successful file download

mimetype
string
required

File MIME type

Example:

"audio/mpeg"

fileURL
string

Public file URL, available for 2 days

Example:

"https://api.exemplo.com/files/arquivo.mp3"

base64Data
string

File content in base64 (if return_base64=true)

Example:

"UklGRkj..."

transcription
string

Transcribed text from audio (if transcribe=true)

Example:

"Transcribed text"