Zoho Remote API: Sheets OK, Writer & Show problems

Zoho Remote API: Sheets OK, Writer & Show problems

Hi all.

I've been integrating the Remote API in a custom application for some days.

First I added the Zoho Sheet functionality. Basically all it does is read the contents of an XLS file, and then it makes a PHP Curl call via POST to pass the file to your system and get the URL of the editor, which is loaded as soon as your server returns a response.

With Zoho Sheet I found zero problems. Everything works perfectly! Great job.

But today I started working with Zoho Writer and Zoho Show (via Remote API) and started finding a lot of problems. With Zoho Show sometimes I get an "API Key is not valid" error (code 3890), other times I get a "null" url without error or warning message, just RESULT=FALSE.

With Zoho Writer I found other problems loading a file... it doesn't accept TXT or PDF format (altought it is said in the documentation) and sometimes does not even return an URL, simply "null" with no Warning or Error message.

My call to Zoho Writer is like this:

    $url = 'http://export.writer.zoho.com/remotedoc.im?apikey='.$ZOHO_API_KEY.'&output=url'.'&lang='.$langcode;
   
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, array(    'id' => $file_id,
                                                   'filename' => $f->name,
                                                'persistence' => 'false',
                                                'format' => $format,
                                                'saveurl' => $save_file_destination,
                                                'content' => $fcontent
                                                )
                );
    $result = curl_exec($ch);
    curl_close($ch);


This same code works with Zoho Sheet but not with Zoho Writer or Zoho Show... how is that possible? In fact, I have yet to see Zoho Show application using the remote API.

What am I doing wrong? Please help me.

Thank you.