To view a private document, you can post the document to Zoho Viewer as a multi-part form submit and get back a temporary URL to view the document.
<form name="myform" action="http://viewer.zoho.com/api/view.do" method="post" enctype="multipart/form-data">
<input type="hidden" name="apikey" value="your_api_key_here"/>
<input type="file" name="file" size="38"/>
<input type="submit" name="submit" value="Upload"/>
</form>
| Parameter | Required | Description |
| apikey | Mandatory | Your API Key. If you don't have one, get it here. |
| file | Mandatory | The file to be viewed. |
| redirect | Optional | true - If you want to directly view the file after the POST succeeds. Useful if the POST is done from the user's browser. false - If you want to POST the file and get the temporary URL of the document in Zoho Viewer which can be viewed online. Default is false if not provided. |
{
"response":
{
"result":"Success",
"url":"http://viewer.zoho.com/temp/gmgt1kaFmgt1kaF"
}
}And here is a sample response upon failure:{
"response":
{
"result":"Failure",
"error":
{
"code":5833,
"message":"Server Error while processing the request"
}
}
}