We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.
Forum Discussion
Peter D.51
9 years agoNew member | Level 1
Python API for Dropbox
Trying to produce a Python script to manipulate sharing of folders between Dropbox accounts. The Tutorial is not present, and the APIs doe not seem to provide a mechanism to build a Members data str...
Stephen C.14
9 years agoDropbox Staff
Here is a brief sample with the functionality that you want:
import sys
import dropbox
print 'Running'
dbx = dropbox.Dropbox('<GENERATED ACCESS TOKEN FROM MY APPS PAGE>')
curr_account = dbx.users_get_current_account()
shared_folder_name = '<SHARED FOLDER NAME>'
# Create a shared folder
launch = dbx.sharing_share_folder('/' + shared_folder_name)
if not launch.is_complete():
print 'Shared folder creation failed, exiting'
sys.exit(-1)
meta_data = launch.get_complete()
member_select = dropbox.sharing.MemberSelector.email('<INVITEE EMAIL>')
access_level = dropbox.sharing.AccessLevel.editor
add_member = dropbox.sharing.AddMember(member_select, access_level)
dbx.sharing_add_folder_member(meta_data.shared_folder_id, [add_member],
custom_message="<CUSTOM EMAIL MESSAGE>")
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 2 months agoIf 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 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!