Discuss Dropbox Developer & API
I have a system by which I load audio files to dropbox via python, and all of these files need to be accessable to anyone with the shared link, thus allowing me to give my site's visitors access to the lectures in my dropbox folder.
Ideally, I'd like to create a permanent link for each file that I add to a collection on my site via a post-request, and I can then just use this url whenever necessary as queried by the site visitor. Is this possible? A permanent link to be saved for future reference?
I've search far and wide, and haven't found a way to do this. So - on to my second best option:
Assuming I save the necessary meta-data to my site's collection, maybe I can then use some backend javascript in order to create and use the shared link. How should I go about this?
Can I use the key and secret I'm allready using in my python script?
Does one use a url-fetch such as https://api.dropbox.com/1/shares/<root>/<path> ?
Or does one need to call sharingCreateSharedLinkWithSettings?
The site is a Wix created site in case it matters...
Any pointers would be greatly appreciated!
Thanks!
First, for reference, that /1/shares URL is part of API v1, which is retired.
If you're using the Python SDK and want non-expiring shared links, you should use sharing_create_shared_link_with_settings. That allows you to programmatically create shared links that don't expire by default (but can be revoked by the user/app) for any file or folder. You can store and re-use these links as desired. You can also modify them if needed, for different behaviors such as direct file content access or download, as documented here.
Thanks for the reply! I was under the imression that creating links via sharing_create_shared_link_with_settings creates expiring links.
But if they're permanent then that solves so much trouble I can't even explain!
No problem, I'm happy to help. For reference, some account types have the option to set an expiration on shared links, via SharedLinkSettings.expires, but by default there's no expiration.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter 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!