One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
brian_lawney
7 years agoNew member | Level 2
Non-expiring direct links
I am looking for some help with orchestrating downloads from Dropbox to a local filesystem. I have essentially built a file-transfer application which will allow our users to upload large files from Dropbox to our system.
Up to this point I have been using the javascript Chooser successfully-- the users login to Dropbox, select their files, and the temporary "direct" links are sent server-side, where we download with something like wget (wget -q -O - <temporary link>) . However, this method has the limitation of the 4-hour expiration. In the case of especially large transfers, I would like to avoid this limitation as I do not want to limit the size of the files that my users can transfer.
Now, I know I can have the user approve my application, perform oauth2 flow to get the code/token, and then use the SDK to query a user's Dropbox server-side. Presumably, that would give my application unlimited time to perform any downloads. We have been using the SDK to upload files from our system to Dropbox, and that's been great. HOWEVER, I like the javascript chooser and would rather not write my own "file browser" UI.
If I have the oauth2 token AND the temporary link, is there a way I can "convert" that to a path which I can use which does not have the time constraint? I'd love to be able to continue using the Chooser, and reverse-engineer the path in the user's Dropbox (to which I will have full access). Is this remotely possible?
- Greg-DB
Dropbox Staff
There isn't a way to do that exactly. Instead though, you can use "preview" links, and then modify them for direct access:
https://www.dropbox.com/help/desktop-web/force-download
That will give you a non-expiring link from which you can directly download the file content.
Things to be aware of however:
- these preview links don't expire but can still be revoked at any time by the user
- these preview links will be listed in the user's shared links on https://www.dropbox.com/links
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 11 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!