# get_message_attachment: Download a message attachment

Download one file attached to a message. This action only reads; it changes nothing. Plan: Free and Connect.

```
POST https://api.heyreagent.com/v1/actions/get_message_attachment
Authorization: Bearer YOUR_KEY
content-type: application/json

{
  "messageId": "PASTE_MESSAGE_ID_HERE",
  "attachmentId": "PASTE_ATTACHMENT_ID_HERE"
}
```

## What you give it

- `messageId` (needed): a message id. The message id (from list_chat_messages). Where to get it: Run `list_chat_messages` and use `messages[].id`.
- `attachmentId` (needed): a attachment id. The attachment id (from the message's attachments). Where to get it: Run `list_chat_messages` and use `messages[].attachments[].id`.
- `connectionId` (optional): a connection id. Which of your LinkedIn accounts to act from (its id from list_linkedin_accounts). Omit to use your first live one. Where to get it: Run `list_linkedin_accounts` and use `accounts[].id`.

## What you get back

The file is in `result.file`, as `{ contentType, base64 }`.

## Good to know

- Files over 5 MB are not returned.

Page: https://heyreagent.com/docs/actions/get_message_attachment