Dropbox API 和 PHP

发布于 2024-12-22 11:58:26 字数 1176 浏览 2 评论 0原文

我在尝试读取驻留在子文件夹而不是父文件夹中的文件内容时遇到错误。

致命错误:未捕获异常“异常”,消息“无效” 签名。预期的签名基字符串: GET&https%3A%2F%2Fapi-content.dropbox.com%2F1%2Ffiles%2Fdropbox%2FProjects%2FMAC%2520Error.rtf&oauth_consumer_key%3Dbdagb07uu6zq827%26oauth_nonce%3 D46d063d5815a0972d63cf72359c0349f%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1324449973%26oauth_token%3D7f2cr9kppqo2hxz%26oauth_version%3D1.0 (状态代码:403)'中 /Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/Dropbox/OAuth/Consumer/Curl.php:133 堆栈跟踪:#0 /Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/Dropbox/API.php(109): Dropbox\OAuth\Consumer\Curl->fetch('GET', 'https://api-con...', '文件/dropbox/P...',数组) #1 /Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/check.php(21): Dropbox\API->getFile('Projects/MAC Er...') #2 {main} 抛出 /Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/Dropbox/OAuth/Consumer/Curl.php 第133行

我正在使用 Ben 的 Dropbox Library for php

https://github.com/BenTheDesigner/Dropbox

谢谢

I am gelling following error while trying to read file content which is residing in a subfolder rather than a parent folder.

Fatal error: Uncaught exception 'Exception' with message 'Invalid
signature. Expected signature base string:
GET&https%3A%2F%2Fapi-content.dropbox.com%2F1%2Ffiles%2Fdropbox%2FProjects%2FMAC%2520Error.rtf&oauth_consumer_key%3Dbdagb07uu6zq827%26oauth_nonce%3D46d063d5815a0972d63cf72359c0349f%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1324449973%26oauth_token%3D7f2cr9kppqo2hxz%26oauth_version%3D1.0
(Status Code: 403)' in
/Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/Dropbox/OAuth/Consumer/Curl.php:133
Stack trace: #0
/Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/Dropbox/API.php(109):
Dropbox\OAuth\Consumer\Curl->fetch('GET', 'https://api-con...',
'files/dropbox/P...', Array) #1
/Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/check.php(21):
Dropbox\API->getFile('Projects/MAC Er...') #2 {main} thrown in
/Applications/MAMP/htdocs/dbcatalog/BenTheDesigner-Dropbox-88e3876/Dropbox/OAuth/Consumer/Curl.php
on line 133

I am using Ben's Dropbox Library for php

https://github.com/BenTheDesigner/Dropbox

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

简单气质女生网名 2024-12-29 11:58:26

如果您正在寻找简单的 PHP-API,可以在这里找到:

https://github。 com/hawaiianchimp/Dropbox-PHP-API/

If you are looking for a simple PHP-API you can find one here:

https://github.com/hawaiianchimp/Dropbox-PHP-API/

久夏青 2024-12-29 11:58:26

这是 OAuth 请求签名不正确时返回的消息。这可能是您正在使用的库的错误。乍一看,它似乎可能错误地编码了“MAC Error.rtf”文件的名称。查看其网站上提到的 PHP SDK dropbox 作为替代方案,并向库所有者提出此问题。

生成此代码的代码也会有所帮助。

This is the message thats returned when a OAuth request is signed incorrectly. This is likely the fault of the library you're using. At first glance, it looks like it may be encoding the name of your "MAC Error.rtf" file incorrectly. Checkout the PHP SDK dropbox mentions on its website as an alternative and raise this issue with the library's owner.

The code that generates this would help too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文