You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Akansh Gautam's avatar
Akansh Gautam
Explorer | Level 4
2 years ago

Sharing multiple folder using api

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

 

 

  • 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.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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.