cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

File sharing with dbx.sharing_create_shared_link

File sharing with dbx.sharing_create_shared_link

venkate
Explorer | Level 3

Hi,

 

I am trying to create a sharable link for files in shared folders with visibility control, using Dropbox API

the code I use is 

 

shared_link_metadata = dbx.sharing_create_shared_link("/2. Info/02. GEC-W2B-BMD-GEC-003642-20190127_Weekly Commodity Tracker_P227_TemplateR5.xlsx")
shared_link_metadata.url

 

with this I can get the sharable link with public visibility, However i want to generate links that are only visible to the user with access to the shared folder.

1 Accepted Solution

Accepted Solutions

Re: File sharing with dbx.sharing_create_shared_link

Greg-DB
Dropboxer

First, note that sharing_create_shared_link is deprecated in favor of sharing_create_shared_link_with_settings.

 

For this use case, it sounds like you may want to create the link like this:

 

dbx.sharing_create_shared_link_with_settings(path=path, settings=dropbox.sharing.SharedLinkSettings(audience=dropbox.sharing.LinkAudience.no_one))

 

The "no_one" audience means that the link itself does not grant access; the user would need to have access to the file already, e.g., via the parent shared folder.

View solution in original post

1 Reply 1

Re: File sharing with dbx.sharing_create_shared_link

Greg-DB
Dropboxer

First, note that sharing_create_shared_link is deprecated in favor of sharing_create_shared_link_with_settings.

 

For this use case, it sounds like you may want to create the link like this:

 

dbx.sharing_create_shared_link_with_settings(path=path, settings=dropbox.sharing.SharedLinkSettings(audience=dropbox.sharing.LinkAudience.no_one))

 

The "no_one" audience means that the link itself does not grant access; the user would need to have access to the file already, e.g., via the parent shared folder.

View solution in original post

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?