Dropbox API和PHP [英] Dropbox API and PHP
问题描述
尝试读取位于子文件夹而不是父文件夹中的文件内容时,出现了以下错误。
I am gelling following error while trying to read file content which is residing in a subfolder rather than a parent folder.
致命错误:未捕获的异常 Exception,消息为无效的
签名。预期的签名基本字串:
GET& https%3A%2F%2Fapi-content.dropbox.com%2F1%2Ffiles%2Fdropbox%2FProjects%2FMAC%2520Error.rtf& oauth_consumer_key%3Dbdagb07uu6zq827%26oauth_nonced%3cf23.dcfd3df3df3df3df3df3df3d3df3d3df3d3df3df3df3df3df3df3df3dfdf%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%df%dfd%df%dfd%df%d%d%dd -
中的SHA1%26oauth_timestamp%3D1324449973%26oauth_token%3D7f2cr9kppqo2hxz%26oauth_version%3D1.0
(状态代码:403)'/ Applications / MAMP / htdocs / dbcatalog / BenTheDesigner-Dropbox-88e3876 /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 ...',
'files / dropbox / P ...',Array)#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
ne 133
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
我正在使用Ben's Dropbox Library for php
I am using Ben's Dropbox Library for php
https://github.com/BenTheDesigner/Dropbox
谢谢
推荐答案
如果您正在寻找一个简单的PHP-API,则可以在这里找到一个:
If you are looking for a simple PHP-API you can find one here:
https://github.com/hawaiianchimp/Dropbox-PHP- API /
这篇关于Dropbox API和PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!