One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
Burak_Cayir
8 years agoExplorer | Level 3
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);
- Greg-DB
Dropbox Staff
I redacted your access token from your post, but you should revoke it now since it was publicly posted. You can do so by revoking access to the app entirely, if the access token is for your account, here:
https://www.dropbox.com/account/security
Or, you can disable just this access token using the API:
v1: https://www.dropbox.com/developers/core/docs#disable-token
v1 PHP SDK: https://dropbox.github.io/dropbox-sdk-php/api-docs/v1.1.x/class-Dropbox.Client.html#_disableAccessToken
v2: https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke
Also, note that the SDK you're using uses API v1, which is deprecated:
https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/
You should switch to API v2 whenever possible. For PHP, you can either use a third party library:
https://www.dropbox.com/developers/documentation/communitysdks
Or use the HTTPS endpoints directly:
https://www.dropbox.com/developers/documentation/http/documentation
If you run in to any issues, we're here to help. In that case, please post the error message you're getting (in addition to the code).- Burak_CayirExplorer | Level 3Ok , I clicked that links but I cant find revoke option
https://www.dropbox.com/account/security- Greg-DB
Dropbox Staff
To revoke an app, click the 'x' at the far right of the app's row.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 14 minutes ago
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!