Canonical: https://weaveos.com/reference/gmail/download-attachments

1. [Software capabilities](https://weaveos.com/reference)
2. /[Gmail](https://weaveos.com/reference/gmail)
3. /How to download Gmail attachments

Gmail capability

# How to download Gmail attachments

For an attachment with an attachmentId, call users.messages.attachments.get and decode the returned data as base64url. For a one-off download, open the message in Gmail and use the attachment’s Download button.

Documentation reviewed November 26, 2026

## Ways to do it

API

### users.messages.attachments.get

Get the message in FULL format, find the attachmentId on the relevant MIME part, then request that ID for the same message.

- Requirements

  A Gmail OAuth token with a read scope such as gmail.readonly, plus the message ID and attachment ID.

- Limitations

  Some MIME part bodies carry data inline. Those parts have no attachmentId to pass to this endpoint.

Example

```
GET https://gmail.googleapis.com/gmail/v1/users/me/messages/MESSAGE_ID/attachments/ATTACHMENT_ID
```

[Read source: Gmail attachment retrieval reference ↗](https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages.attachments/get)

Interface

### Download a Gmail attachment

Open the email in Gmail and use Download on the attachment you want.

- Requirements

  Access to the mailbox and a downloadable attachment on the message.

- Limitations

  Gmail disables attachment downloads on confidential-mode messages.

[Read source: Gmail attachment download guide ↗](https://support.google.com/mail/answer/30719)

## More from Gmail

[View all Gmail capabilities →](https://weaveos.com/reference/gmail)

- [How to search Gmail messages↗](https://weaveos.com/reference/gmail/search-messages)
- [How to retrieve the body of a Gmail message↗](https://weaveos.com/reference/gmail/read-message)
- [How to apply a Gmail label↗](https://weaveos.com/reference/gmail/apply-label)
