Skip to content
Skip to main content
GET
/v3/grants/{grant_id}/attachments/{attachment_id}/download

Download an Attachment

Returns and downloads the specified attachment.

NYLAS API KEYACCESS TOKEN

Parameters

Path parameters

grant_id*string

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

attachment_id*string

ID of the attachment to access. Nylas recommends you URL-encode this field, or you might receive a 404 error if the ID contains special characters (for example, #).

Query parameters

query_imapboolean

(IMAP, Yahoo, and iCloud only) When true, Nylas downloads the attachment directly from the IMAP server instead of the Nylas database.

Default: false
message_id*string

ID of the message the specified attachment belongs to.

Responses

string<binary>
GEThttps://api.us.nylas.com/v3/grants/{grant_id}/attachments/{attachment_id}/download?query_imap=false

Find your API key in the Nylas Dashboard under API Keys in your application settings.

grant_idrequiredstring

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

attachment_idrequiredstring

ID of the attachment to access. Nylas recommends you URL-encode this field, or you might receive a `404` error if the ID contains special characters (for example, #).

message_idrequiredstring

ID of the message the specified attachment belongs to.

query_imapboolean

(IMAP, Yahoo, and iCloud only) When true, Nylas downloads the attachment directly from the IMAP server instead of the Nylas database.