Get the media of a WhatsApp message
get_mediaRetrieve a WhatsApp message's media—voice note transcripts or saved audio files, photos, and attached files—by message ID, saving files to a chosen directory when needed.
Instructions
What a message's media holds: a voice note or audio as its transcript (kept once made; an API provider bills it), or with save_to its file; a photo attached as an image; any file saved at path on the machine running wazap; a copy kept on arrival answers first. MEDIA_UNAVAILABLE: gone, none kept.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save_to | No | Absolute directory; default <data-dir>/media. A recording: its file, and no new transcript | |
| language | No | What is spoken, e.g. "ro" | |
| account_id | No | ||
| message_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | No | ||
| path | No | ||
| size | No | ||
| type | Yes | ||
| sender | Yes | ||
| source | No | kept: the copy wazap kept when it arrived; whatsapp: downloaded now | |
| caption | Yes | ||
| filename | No | The name it was saved under | |
| account_id | Yes | ||
| message_id | Yes | ||
| transcript | No | ||
| image_attached | No | The photo, or a small preview of it, is attached | |
| original_filename | Yes | ||
| transcript_unavailable | No |