Skip to main content
POST
/
message
/
download
Download file from a message
curl --request POST \
  --url https://api.wppfy.com/message/download \
  --header 'Content-Type: application/json' \
  --header 'token: <api-key>' \
  --data '
{
  "id": "7EB0F01D7244B421048F0706368376E0",
  "return_base64": false,
  "generate_mp3": true,
  "return_link": true,
  "transcribe": false,
  "openai_apikey": "sk-...",
  "download_quoted": false
}
'
{
  "mimetype": "audio/mpeg",
  "fileURL": "https://api.example.com/files/file.mp3",
  "base64Data": "UklGRkj...",
  "transcription": "Transcribed text"
}

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

If true, returns the content in base64

generate_mp3
boolean
default:true

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

Saves and returns public file URL

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 URL to access the file (if return_link=true)

Example:

"https://api.example.com/files/file.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"