Read an attachment
messages_attachments_getRead one attachment of a message. The answer is what it says, as plain text; with as original it is the file itself, base64, or a picture too large for one answer shrunk to fit. messages_get and threads_get name a message's attachments and their sizes. Either answer names a link the original is served at whole for 15 minutes after it is given, to a plain GET carrying no credential. From a terminal, curl --fail-with-body -o "" fetches it; a refused fetch exits non-zero and leaves its reason in that file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as | No | text, the default: what the file says. original: the file itself, byte for byte, or a picture too large for one answer shrunk to fit. | |
| id | Yes | An attachment id, as a message read named it. | |
| mailbox | Yes | The mailbox's name or its email address. | |
| messageId | Yes | The message's id, as a search or a read answered it. | |
| continuation | No | Where the words resume, as the last part read named it. The original always comes whole. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| size | Yes | ||
| text | No | ||
| shrunk | No | Where a picture's original is more than one answer carries: the JPEG data holds in its place, shrunk to fit. | |
| address | No | ||
| charset | No | ||
| outcome | No | ||
| filename | Yes | ||
| mimeType | Yes | ||
| returned | Yes | ||
| messageId | Yes | ||
| attachmentId | Yes | ||
| continuation | No | ||
| contentFormat | Yes | ||
| sizePrecision | Yes | ||
| carriesPayload | Yes |