Download a Photo
Purpose
To download the photo associated with a record in Zoho CRM.
Endpoints
- GET /{module_api_name}/{record_ID}/photo
Request Details
Request URL
{api-domain}/crm/{version}/{module_API_name}/{record_ID}/photo
Supported modules
Leads, Contacts, Accounts, Products, Vendors, and custom modules
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.modules.ALL
(or)
ZohoCRM.modules.{module_name}.{operation_type}
Possible module names
leads, contacts, accounts, products, deals, vendors and custom modules
Possible operation types
ALL - Full access to images
READ - Get photo data
Possible Errors
- INVALID_MODULEHTTP 400
- The module name given seems to be invalid.
Resolution: Specify a valid module API name. - The given module is not supported.
Resolution: Specify a supported module API name. Refer to the possible module names section at the beginning of this page.
- The module name given seems to be invalid.
- INVALID_REQUEST_METHODHTTP 400
The request method is incorrect.
Resolution: Use the HTTP GET method to make this API call. Any other request method will result in this error. - AUTHORIZATION_FAILEDHTTP 400
User does not have sufficient privilege to download images.
Resolution: Contact your system administrator. - RECORD_LOCKEDHTTP 400
Cannot get the record image that is not approved yet
Resolution: Wait until the Zia image or the merge duplicates process is complete and try again. - NOT_APPROVEDHTTP 400
Cannot get the record image that is not approved yet
Resolution:- Case 1: If the record is in the rejected state due to Zia image validation, either upload a new image (or) delete the failed image and, resubmit the record to Zia image validation.
- Case 2: If the record is in Zia record approval, the system will not allow you to update the images of the record until the reviewer approves or rejects the record.
- OAUTH_SCOPE_MISMATCHHTTP 401
The access token you have used to make this API call does not have the required scope.
Resolution: Generate a new access token with the required scopes for this API. Refer to the Scope section at the beginning of this page for the list of required scopes. - NO_PERMISSIONHTTP 403
Permission denied to download images
Resolution: Contact your system administrator. - INVALID_URL_PATTERNHTTP 404
The request URL is incorrect.
Resolution: Specify a valid request URL. Refer to the request URL section at the beginning of this page for more details. - INTERNAL_ERRORHTTP 500
Unexpected and unhandled exception in the server.
Resolution: Contact the support team at support@zohocrm.com.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/Leads/3000000038009/photo"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Copiedresponse = invokeurl
[
url: "https://www.zohoapis.com/crm/v8/Leads/3000000038009/photo"
type: GET
connection:"crm_oauth_connection"
];
info response;
The requested photo from the Leads record with id 3000000038009 will be downloaded.