One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
intouchbiz
8 years agoNew member | Level 2
direct access img PHP
It is possible to access an img in dropbox direct using php, without using the download API method?
Or it's only possible to see metadata?
//see metadata $folderMetadata = $dbxClient->getMetadataWithChildren("/"); print_r($folderMetadata ["contents"][0]["path"]); //dowload file (I dont want to download file to the server to open my img) $f = fopen("test2.txt", "w+b"); $fileMetadata = $dbxClient->getFile("/test.txt", $f); fclose($f);
- Greg-DB
Dropbox Staff
The SDK you're using uses API v1 which is deprecated and being retired soon. You should migrate to API v2 instead.
We don't have plans for an official PHP SDK for Dropbox API v2, but you can use a third party library or, you can call the HTTPS endpoints themselves.
For example, to access file content, you can call /2/files/download, which will return the file content in the response. You can then do whatever you want with the returned file data, which doesn't have to be saving it to a file.
Or you can get a temporary link to the file content using /2/files/get_temporary_link.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 4 hours 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!