cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropbox PHP API error

Dropbox PHP API error

Erlandas M.
New member | Level 1

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 2

Greg-DB
Dropbox Staff

[Cross-linking with StackOverflow where it seems you've already sorted this out: https://stackoverflow.com/questions/28540950/dropbox-php-api-error ]

Erlandas M.
New member | Level 1

Yes, I have.The problem was that I was using an outdated piece of code.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Erlandas M. New member | Level 1
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?