cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more 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: 

Sharing folders via API with outside email address

Sharing folders via API with outside email address

sfox
Explorer | Level 3
Go to solution

Using the Python SDK. I am creating a shared folder and would like to invite someone to collaborate on the folder and I only have the email address.

 

We are on Dropbox Plus and it is not a team account. Is this possible and if so how would it be done?

 

I tried using the sharing_add_folder_member, but it does not sure how/where I could add using email address. The variations I get back refer to trying to return str and not AddMember.

 

I have not been able to findout how to addmember using the API documentation.

 

Thanks in advance for any assistance you can provide on this.

 

Thanks.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

When using sharing_add_folder_member, you specify the people to invite via the 'members' parameter, which expects a list of AddMember. (Apologies the type isn't more clearly shown there. We'll make a note of that.)

 

So, you can invite someone to a shared folder using the Python SDK like this:

 

member_selector = dropbox.sharing.MemberSelector.email("user@example.com")
add_member =  dropbox.sharing.AddMember(member_selector)
members = [add_member] # this can contain more than one member to add

res = dbx.sharing_add_folder_member(shared_folder_id, members)

Hope this helps! 

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

When using sharing_add_folder_member, you specify the people to invite via the 'members' parameter, which expects a list of AddMember. (Apologies the type isn't more clearly shown there. We'll make a note of that.)

 

So, you can invite someone to a shared folder using the Python SDK like this:

 

member_selector = dropbox.sharing.MemberSelector.email("user@example.com")
add_member =  dropbox.sharing.AddMember(member_selector)
members = [add_member] # this can contain more than one member to add

res = dbx.sharing_add_folder_member(shared_folder_id, members)

Hope this helps! 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?