Download Inline Image
Purpose
This API enables the user to download inline images embedded in an email.
OAuth Scope
Use the scope
ZohoMail.messages.ALL (or) ZohoMail.messages.READ
to generate the Authtoken.
ALL - Grants full access to messages.
READ - Grants access to read messages.
Request URL
Method: GET
https://mail.zoho.com/api/accounts/{accountId}/folders/{folderId}/messages/{messageId}/content/{contentId}
Path Parameters
- accountId* long
- This parameter is used to identify the specific account to fetch details.
- This parameter can be retrieved from the Get User Account Details API.
- folderId* long
- This parameter is used to identify the specific folder from which the email needs to be retrieved.
- This parameter can be retrieved from the Get All Folders API.
- messageId* long
- This parameter is the unique ID associated with the particular email.
- This parameter can be retrieved from the List Emails API.
- contentId* string
- This parameter is the unique ID associated with the particular content of an email.
- This parameter can be retrieved from the Get Email Attachment Info API.
Query Parameters
- fileName* string
- This parameter specifies the file name for the downloaded image.
- This parameter can be retrieved from the Get Email Attachment Info API.
* - Mandatory parameter
Response Codes
Refer here for the response codes and their meaning.
Sample Request
Copiedcurl "https://mail.zoho.com/api/accounts/12345678/folders/9000000002014/messages/167143473031311477/content/0.28869215390.9068479665823862258.1852945fb3b__inline__img__src?fileName=import.jpg" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Zoho-oauthtoken *****" \
--output /home/username/Downloads/image.jpg
Sample Success Response
CopiedImage will be downloaded as a file.
Sample Failure Response
Copied{
"status": {
"code": 400,
"description": "Invalid Input"
},
"data": {
"moreInfo": "MsgVO is null"
}
}