We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

slowdolphin's avatar
slowdolphin
Explorer | Level 3
6 years ago

Try to Share a Sub-Folder of a Team Folder using API

I can share a Shared folder to a member using https://api.dropboxapi.com/2/sharing/add_folder_member Data: { "shared_folder_id": "xxxxxxxxx", "members": [{ "member": { ...
  • Greg-DB's avatar
    6 years ago

    If you've already created the team folder, you can then share a sub folder under it using /2/sharing/share_folder, and then add the group as a member using /2/sharing/add_folder_member.

    That would look like this:

    curl -X POST https://api.dropboxapi.com/2/sharing/share_folder \
        --header "Authorization: Bearer <ACCESS_TOKEN>" \
        --header "Dropbox-API-Select-Admin: <ADMIN_MEMBER_ID>" \
        --header "Content-Type: application/json" \
        --data "{\"path\": \"ns:<TEAM_FOLDER_ID>/<SUBFOLDER_NAME>\"}"
    
    curl -X POST https://api.dropboxapi.com/2/sharing/add_folder_member \
        --header "Authorization: Bearer <ACCESS_TOKEN>" \
        --header "Dropbox-API-Select-Admin: <ADMIN_MEMBER_ID>" \
        --header "Content-Type: application/json" \
        --data "{\"shared_folder_id\": \"<SHARED_FOLDER_ID>\",\"members\": [{\"member\": {\".tag\": \"dropbox_id\",\"dropbox_id\": \"<GROUP_ID>\"}}]}"