Forum Discussion

Burak_Cayir's avatar
Burak_Cayir
Explorer | Level 3
8 years ago

I can't download my files with PHP Core API

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);

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 14 minutes ago
351 Following

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 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!