cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Discuss Dropbox Developer & API

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

Re: Sharing multiple folder using api

Sharing multiple folder using api

Akansh Gautam
Explorer | Level 4
Go to solution

I have dropbox team account

I created multiple folders using batch api for folder create

 

because creating multiple folders using

dbx_client.with_path_root(
path_root=pr
).sharing_share_folder(path=f"{path}")

always comes up with a async call, I tried with 15 folders sometimes 7 are created sometime 8 this doesn't work properly.

 

 

 

So after using batch api I am trying to share folder with emails in a loop still out of 15 it is only sharing 7 or 8

dbx_client.sharing_add_folder_member(
shared_folder_id=shared_folder_id,
members=[
AddMember(
access_level=AccessLevel(tag=access_level),
member=MemberSelector(
tag="email",
value=email,
),
)
],
)


Are you guys tell me a proper api which can share multiple folders in a single go, I didn't found any

Async calls always miss some folders in sharing. This looks useless.

Help me there asap

 

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Dropbox doesn't offer batch endpoints for sharing multiple folders or adding members to multiple folders, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

 

You should avoid making multiple changes at the same time to avoid lock contention, which can cause some to fail.

 

Whenever an operation returns an async job ID, you should use the corresponding endpoint to check the result of the job, to see if it succeeded or failed and why. For example, for sharing_share_folder you would use sharing_check_share_job_status.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

Dropbox doesn't offer batch endpoints for sharing multiple folders or adding members to multiple folders, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

 

You should avoid making multiple changes at the same time to avoid lock contention, which can cause some to fail.

 

Whenever an operation returns an async job ID, you should use the corresponding endpoint to check the result of the job, to see if it succeeded or failed and why. For example, for sharing_share_folder you would use sharing_check_share_job_status.

Need more support?