# `bird whatsapp media`

## Usage

```bash
bird whatsapp media <message-id> <media-id> [flags]
```

## Description

Download the media on a received WhatsApp message — an image, video, audio clip,
sticker or document. The media id is the `id` on the message's content object,
which `bird whatsapp get` returns.

The bytes are written to --output when set, otherwise to stdout:

bird whatsapp media wam\_123 waf\_456 --output photo.jpg

--url prints the short-lived download URL (valid for 15 minutes) instead of
downloading, for handing to another tool. That URL is pre-authorized and needs
no Authorization header; the follow-up request must not send one. --url and
--output cannot be combined.

Media is kept for 30 days after the message arrives; after that the message still
lists the media's mime\_type and caption, and this exits with a gone error.

## Examples

```bash
bird whatsapp media <message-id> <media-id> --output photo.jpg
```

## Options

| Name           | Description                                               |
| -------------- | --------------------------------------------------------- |
| `--output, -o` | Write the bytes to this file instead of stdout            |
| `--url`        | Print the short-lived download URL instead of downloading |

## Related

| Name                                                                    | Description                              |
| ----------------------------------------------------------------------- | ---------------------------------------- |
| [`bird whatsapp get`](/docs/cli/reference/whatsapp-get)                 | Get a WhatsApp message                   |
| [`bird whatsapp list`](/docs/cli/reference/whatsapp-list)               | List WhatsApp messages                   |
| [`bird whatsapp list-events`](/docs/cli/reference/whatsapp-list-events) | List events for a WhatsApp message       |
| [`bird whatsapp send`](/docs/cli/reference/whatsapp-send)               | Send a WhatsApp message to one recipient |