Show received image from Zoho

35 Views Asked by At

I am using the Zoho Rest API to establish a connection between Zoho CRM and my client's WordPress website. With a request, I am trying to retrieve an image from Zoho (https://www.zoho.com/crm/developer/docs/api/v6/get-files.html). This works fine, but I'm not entirely sure about the nature of what I receive:

enter image description here

I reached out to Zoho support for clarification, but they couldn't precisely identify the content received. They mentioned that they only perform requests with Postman, and the image is displayed correctly there. Indeed, when I use the same request with Postman, I can see the image instead of a string:

enter image description here

Does anyone happen to know what exactly I receive and how I can convert it into an image?

1

There are 1 best solutions below

0
Mr. Sam On

CBroe is right.

Writing the content to a file, created the image I need:

$myfile = fopen("newfile.png", "w") or die("Unable to open file!");
fwrite($myfile, $content);
fclose($myfile);