We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
eliotcole
6 years agoExplorer | Level 4
Programmatically Process Shared Link Folders and Sub-Folders and Their Contents
Well I'm still at a loss.
I have the shared link to a folder that I need to check on a daily schedule to see if there's new files. The logic of which is all fine, but I just can't access anythi...
Greg-DB
Dropbox Community Moderator
6 years agoRight, whenever possible, it's best to avoid unnecessarily uploading/downloading locally, for the sake of reliability and efficiency. Passing a link between two services, if supported, would likely be faster.
In this case, if you need a direct link to a file hosted on Dropbox, the specifics will depend on if the file exists in the Dropbox account you're connected to via the API (i.e., the one for which you have an access token).
If the file is in the connected account, /2/files/get_temporary_link would be a good option. That gives you a direct link to the file content, that you could hand off to the other service. Note that these links only last for four hours.
If the file is not in the connected account though, and say, you just have a shared link, /2/files/get_temporary_link won't work. Instead, this will depend on the shared link you have. If the shared link is already for the file itself, you can modify it for direct access as covered here. However, if the shared link is just for a parent folder, as discussed through this thread, then unfortunately there isn't a good solution. As earlier, the API doesn't offer a way to get a link to just the nested file based on a shared link to the folder that contains it.
eliotcole
6 years agoExplorer | Level 4
Thanks again for coming back on this, mate. Really very much appreciated.
One last question ... how about the whole folder? That is, we know, not nested, and available at root.
Is there any internal reason given as to why the access to Shared Files is so antiquated (sorry) ... or ... let's be honest ... restrictive ... next to the rest of the interface? It seems ... odd. Particularly given the removal of RSS and the way that people use Shared Folders.
----
Also, not for nothing, but then this particular guide should include that Shared Sub-Folders are essentially not accessible via the API:
DBX File Access Guide - Dropbox (the "Non-downloadable files" section)
- Greg-DB6 years ago
Dropbox Community Moderator
Thanks for the feedback! I can't speak to why any particular feature was or wasn't implemented, but we appreciate you taking the time to share this. I'll send it along.
If you have a shared link for a folder and wish to get a direct link to that, you can likewise modify that as documented here. For folders, that will give you a .zip file of the folder.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!