cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Check out the Dropbox cheat sheet for getting started in 2021 here!

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Permanent sharing links via python api OR expiring sharing links via js in wix api

Permanent sharing links via python api OR expiring sharing links via js in wix api

Explorer | Level 4

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 3

Re: Permanent sharing links via python api OR expiring sharing links via js in wix api

Dropboxer

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.

Re: Permanent sharing links via python api OR expiring sharing links via js in wix api

Explorer | 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!

 

 

 

Re: Permanent sharing links via python api OR expiring sharing links via js in wix api

Dropboxer

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.

Polls
Are you starting new work habits this year?

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?