首页 文章

使用 zoho api 在浏览器中打开文档

提问于
浏览
0

我试图将 zoho 整合到我的网站,并使用 Wamp 服务器在浏览器中打开文档。

这个代码我试图使用:

<html>
<head>
</head>
<body>

<form method="POST" action="http(s)://export.writer.zoho.com/remotedoc.im" target="_self" 

accept-charset="UTF-8">
<input type="hidden" name="url" value="http://localhost/paper.doc">
<input type="hidden" name="apikey" value="here goes api key">
<input type="hidden" name="output" value="url">
<input type="hidden" name="mode" value="normaledit">
<input type="hidden" name="filename" value="paper.doc">
<input type="hidden" name="lang" value="en">
<input type="hidden" name="skey" value="here goes secret value">
<input type="hidden" name="id" value="12345678">
<input type="hidden" name="format" value="doc">
<input type="hidden" name="saveurl" value="http://localhost/save.php">
<input type="submit" name="submit" value="Open/Edit">
</form>
</body>
</html>

我不知道我得到这个错误:禁止

您无权访问此服务器上的/http(s)://export.writer.zoho.com/remotedoc.im。

我已经正确输入了 api 密钥并且密钥我只是困惑并且卡住 here.Im 被阻止

这是文档:http://apihelp.wiki.zoho.com/Open-Document.html

2 回答

  • 1

    你从网址中取出了(s)了吗?我知道这似乎是一个愚蠢的问题,但我想如果你忽略它我应该检查。该网址为我解析并提供“api 密钥无效”警告。

    给出的错误似乎表明浏览器认为它是相对而不是绝对 URL。

  • 0

    我不太了解 ZOHO,但我也希望将来在我的项目中实现这一点。正如我在https://apihelp.wiki.zoho.com/Open-Document.html#MFS中读到的那样,它表示 saveurl 必须是公共可访问的,并且如果它不能公开访问它会产生错误并且 localhost 不能公开访问,因此它会出错。

相关问题