Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Erlandas M.
10 years agoNew member | Level 1
Dropbox PHP API error
i've been developing a music website that plays .mp3 files from a Public dropbox folder, and i think i've found a solution on how to get file names from a directory in Dropbox.The code i've found is:
$consumerKey = 'key';
$consumerSecret = 'key';
require_once "dropbox-sdk/Dropbox/autoload.php";
session_start();
$oauth = new Dropbox_OAuth_PHP($consumerKey, $consumerSecret);
$dropbox = new Dropbox_API($oauth);
$info = $dropbox->getMetaData('Public', true);
print_r($info['contents']);
The autoload.php is in the right directory, all necessary files are present.But the error I get is:
Fatal error: Class 'Dropbox_OAuth_PHP' not found in C:\wamp\www\api\index.php on line 10
Is there something I'm doing wrong?
2 Replies
Replies have been turned off for this discussion
- Greg-DB10 years ago
Dropbox Community Moderator
[Cross-linking with StackOverflow where it seems you've already sorted this out: https://stackoverflow.com/questions/28540950/dropbox-php-api-error ]
- Erlandas M.10 years agoNew member | Level 1
Yes, I have.The problem was that I was using an outdated piece of code.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!