Download an Attachment

Purpose

This API is used to fetch the attachment content using the attachment ID.

OAuth Scope

Use the scope

MailApps.attachments.ALL (or) MailApps.attachments.READ

ALL - Full access to attachments.

READ - Fetch a specific attachment.

To generate Authtoken, refer here.

Request URL

Method: GET

https://mail360.zoho.com/api/accounts/{account_key}/messages/{messageId}/attachments/{attachmentId}

Path Parameters

  • account_key* string
    • This key is used to identify the account from which the emails have to be retrieved. It is generated during account addition.
    • This parameter can be fetched from Get all accounts API.
  • messageId* long
  • attachmentId* long

 

* - Mandatory parameter

Sample request

Copiedcurl 
"https://mail360.zoho.com/api/accounts/x7**B00s/messages/16*0001/attachments/138**10" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken 8**b64f" \

Sample response

CopiedSuccess message :

Downloaded file!