Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I have a Dropbox basic account, and these are my download codes. But I cant download my files with core API. Please help me .
require_once "lib/Dropbox/autoload.php";
use \Dropbox as dbx;
$appInfo = dbx\AppInfo::loadFromJsonFile("app-info.json");
$webAuth = new dbx\WebAuthNoRedirect($appInfo, "PHP-Example/1.0");
$authorizeUrl = $webAuth->start();
$accessToken = '<ACCESS_TOKEN>';
$dbxClient = new dbx\Client($accessToken, "PHP-Example/1.0");
$f = fopen("2016-2017-bahar-donemi-bilgisayar-muhendisligi-ders-programi.xls", "w+b");
$fileMetadata = $dbxClient->getFile("/2016-2017-bahar-donemi-bilgisayar-muhendisligi-ders-programi.xls", $f);
fclose($f);
[Cross-linking for reference: https://stackoverflow.com/questions/42690512/download-file-not-working-with-dropbox-api ]
Thanks for following up with the additional information. If you're seeing the file metadata as you describe, that means the API call itself worked.
When using that getFile method like this, the file data is saved to the file object supplied by to the resource $outStream parameter. In your case, that's your $f file object. Once that method completes successfully, you can then read the data from that file, which in your case is at the path "tufek.jpg".
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
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!