Volatil3
Volatil3

Reputation: 15008

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.

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

Upvotes: 1

Views: 7176

Answers (2)

seantomburke
seantomburke

Reputation: 11742

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

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

Upvotes: 2

Chris
Chris

Reputation: 3354

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.

Upvotes: 0

Related Questions