我在嘗試讀取駐留在子文件夾而不是父文件夾中的文件內容時發生了以下錯誤。Dropbox API和PHP
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的Dropbox的圖書館PHP
https://github.com/BenTheDesigner/Dropbox
感謝
我假設你在'$ key'填充和'$ secret'正確...不熟悉Dropbox API,但我猜你需要註冊一個API密鑰。 – mpen 2011-12-21 06:40:37
您是否嘗試過搜索他們的論壇? http://forums.dropbox.com/tags.php?tag=invalid-signature – SeanNieuwoudt 2011-12-21 07:13:21