We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
slowdolphin
7 years agoExplorer | Level 3
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": {
...
- 7 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>\"}}]}"
Greg-DB
Dropbox Community Moderator
7 years agoIf 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>\"}}]}"
- slowdolphin7 years agoExplorer | Level 3
Thank you .....thats works perfectly
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!