Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
autozoom3125
6 years agoExplorer | Level 4
Permanent sharing links via python api OR expiring sharing links via js in wix 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!
3 Replies
- Greg-DB6 years ago
Dropbox Community Moderator
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.
- autozoom31256 years agoExplorer | Level 4
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!
- Greg-DB6 years ago
Dropbox Community Moderator
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.
About Discuss Dropbox Developer & API
Make connections with 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!