Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Victor V.3
10 years agoExplorer | Level 3
Api v1 - can I create Permanent Direct Url ?
Hi Dropbox community,
In my application, I am caching a list of internal objects which represent a list of excel files in dropbox. For each internal object I am generating a temporary direct url using api v1. I've read in a different post, that this url experies after 4 hours [https://www.dropboxforum.com/hc/en-us/community/posts/204324265-I-m-saving-a-file-url-by-using-dropin-api-after-a-while-that-url-starts-to-give-401-]. \
Is there a way to generate a permanent download link ? What other options do I have via dropbox api ?
If not, my option would be to set up a 4 hour recurring task, that refreshes my cache, in order to generate a new functional download links for my endusers.
thanks,
-victor
5 Replies
Replies have been turned off for this discussion
- Greg-DB10 years ago
Dropbox Community Moderator
The Dropbox API doesn't currently offer a way to generate permanent direct links like that, but I'll be sure to pass this along as a feature request.
What exactly do you need it for? If you just need to download file content, the normal download endpoints are the best option:
v1: https://www.dropbox.com/developers-v1/core/docs#files-GET
v2: https://www.dropbox.com/developers/documentation/http/documentation#files-downloadThose return the data directly though, not via a URL.
If you really need links, the only current workaround is to use a shared link:
v1: https://www.dropbox.com/developers-v1/core/docs#shares
v2: https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settingsThose don't offer direct file access by default, but can be modified as necessary. This isn't recommended though, as these links are listed to the user on https://www.dropbox.com/links which may confuse them as to why they exist. These links are also subject to bandwidth limits.
- Victor V.310 years agoExplorer | Level 3
Hi Gregory,
Thanks a lot for your answer and sorry for replying late.
A common use case for my internal app would be to generate a new file and upload it to dropbox via the api v1. For the end users of my app, this file would be represented as a report, which they would possible want to download through our own UI. The download url would have been set at creation time, when uploading the file, whereas the download could occur a week later for example, or never :) . However, this is not a problem. Now that I know about the 4 hour limit, I can generate the download url on demand, when the user needs to download the file.
Thanks for your help,
-victor
- Maulik P.10 years agoNew member | Level 1
Hello, I uploaded images on dropbox using api v1.
but i need to view that images on my website for gallery.
I get image url but it redirect to dropbox but i need to view that image in lightbox jquery plugin.
lightbox jquery plugin not able to get image using short url of dropbox api.
Please give me solution for my problem.
Thanks,
Maulik
- Greg-DB10 years ago
Dropbox Community Moderator
HI Maulik, it sounds like you could use the shared links modifications I mentioned in my last reply:
https://www.dropbox.com/help/201
And if you're using API v1 to get the shared links in the first place, you can set short_url to false to avoid the short links:
- Maulik P.10 years agoNew member | Level 1
Thank you Gregory for your valuable response.
It helpful for me.
Thank you again.
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!