cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you an educator? Well we want to hear from you, so check out some tools we think might help you out 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: 

Changing team folder setting with pyhon module

Changing team folder setting with pyhon module

J_Matsumoto
Explorer | Level 4

Hi All.

I want to set team folder using python module.

Team folder creation is complete


However, I do not know the setting method below in the setting of the team folder


Who can manage access to this folder?
Default : "Anyone in your Dropbox Business account with edit permissions"
Change to "Only owners"

Allow links to be shared with people outside this folder?
Default : "Yes"
Change to "No"

1 Accepted Solution

Accepted Solutions

Re: Changing team folder setting with pyhon module

Greg-DB
Dropboxer

You can use the sharing_update_folder_policy method to change the settings of a team folder. 

 

Assuming you're using a Business API member file access app with the Python SDK, that would look like:

 

import dropbox

TEAM_ACCESS_TOKEN = "..."
MEMBER_ID = "..."
TEAM_FOLDER_ID = "..."

dbx_team = dropbox.DropboxTeam(TEAM_ACCESS_TOKEN)
dbx_user = dbx_team.as_user(MEMBER_ID)

res = dbx_user.sharing_update_folder_policy(TEAM_FOLDER_ID, acl_update_policy=dropbox.sharing.AclUpdatePolicy.owner, shared_link_policy=dropbox.sharing.SharedLinkPolicy.members)
print(res)

View solution in original post

2 Replies 2

Re: Changing team folder setting with pyhon module

Greg-DB
Dropboxer

You can use the sharing_update_folder_policy method to change the settings of a team folder. 

 

Assuming you're using a Business API member file access app with the Python SDK, that would look like:

 

import dropbox

TEAM_ACCESS_TOKEN = "..."
MEMBER_ID = "..."
TEAM_FOLDER_ID = "..."

dbx_team = dropbox.DropboxTeam(TEAM_ACCESS_TOKEN)
dbx_user = dbx_team.as_user(MEMBER_ID)

res = dbx_user.sharing_update_folder_policy(TEAM_FOLDER_ID, acl_update_policy=dropbox.sharing.AclUpdatePolicy.owner, shared_link_policy=dropbox.sharing.SharedLinkPolicy.members)
print(res)

View solution in original post

Re: Changing team folder setting with pyhon module

J_Matsumoto
Explorer | Level 4

Greg.

 

Thank you for giving me a hand

It seems made of the way you told

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
    J_Matsumoto Explorer | Level 4
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?