Get a message's media
get_mediaOpen and download media attached to a WhatsApp message by chat ID and message ID, returning photos, files, text, or a temporary download URL.
Instructions
Open the photo, video, voice note, audio recording, document or sticker a message carries (a message from read_inbox with media). Photos and stickers come back as images you can see, and text files (txt, csv, json, …) as text. Voice notes, audio, videos, PDFs and other files up to 10 MB come back as the file itself, which your client saves to disk; videos also come with their preview frame. Every answer has a download_url (any size, valid for an hour) and a ready save_with curl command for saving the file yourself. Needs the connection online; an old file may take a moment while the sender's phone uploads it again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | ||
| message_id | Yes | ||
| connection_id | No | Which of your accounts: a connection id from list_connections, or the account's number. Optional when only one account fits. Left out, it's the account the message is on. |