【问题标题】:How to authorize to download PDF document from content got from google-documents list-api如何授权从 google-documents list-api 获取的内容下载 PDF 文档
【发布时间】:2010-02-18 04:23:06
【问题描述】:

我有通过以下代码授权自己获得的谷歌文档列表:

<cfhttp url="https://www.google.com/accounts/ClientLogin" method="post" result="result" charset="utf-8">
        <cfhttpparam type="formfield" name="accountType" value="HOSTED_OR_GOOGLE">
        <cfhttpparam type="formfield" name="Email" value="abc@gmail.com">
        <cfhttpparam type="formfield" name="Passwd" value="xyz">
        <cfhttpparam type="formfield" name="service" value="writely">
        <cfhttpparam type="formfield" name="source" value="abc-xyz-2010">
    </cfhttp>

现在我可以通过 content.xmlAttribute 从包含所有文档的 xml 文件中下载 word 文档和 PPT。 但我无法下载 PDF 文件。我收到的错误消息是“授权需要错误 401”。我检查了文档说: 也无法为这些类型的文件手动构建下载 URL。相反,将经过身份验证的 HTTP GET 发送到条目的 src 链接:

<content type="text/html" src="https://doc-04-20-docs.googleusercontent.com/docs/secure/m7an0emtau/WJm.../YzI2Y2ExYWVm?h=16655626&e=download&gd=true"/>

谁能告诉我如何传递授权信息并让 PDF 下载链接正常工作。 提前非常感谢!

【问题讨论】:

    标签: coldfusion google-docs google-docs-api


    【解决方案1】:

    method="post" 替换为 method="get"

    【讨论】:

      猜你喜欢
      • 2011-08-08
      • 1970-01-01
      • 2011-08-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多