Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello folks,
when I use the business endpoint to create a team folder (in the legacy configuration of Dropbox), the team folder is created but it is not displayed in the home page, only in the admin console. When I check it in the admin console, I can see no members linked to the team folder. So I checked the API reference to see whether there is a method which would link the teams or members to the team folder but I was unable to find such method.
May you please help me with this issue?
Thank you!
Tereza
Yes, when you first create a new team folder using /2/team/team_folder/create, it won't have any members. This does mean even the team itself won't automatically be added to it.
To add members to the folder, whether that's individual members, groups, or the entire team, you should use /2/sharing/add_folder_member via the "member file access" feature. To add the entire team, you can add the team group, which you can look up by using /2/team/groups/list[/continue].
But /2/sharing/add_folder_member is using the user endpoint while we need a business endpoint..? We tried this method using the business endpoint with no success.
Is there any other way how to solve this issue?
Thanks in advance.
The /2/sharing/add_folder_member endpoint is a Dropbox API user endpoint, but you can call it using the same "team member file access" Dropbox Business API app via the "member file access" feature. That's a way for Dropbox Business API app's with the "team member file access" permission to call Dropbox API endpoints by specifying a user or admin to operate on behalf of.
For example, in this case, you can add the 'Dropbox-API-Select-Admin' HTTP header and set it to the account ID of a team admin to make the /2/sharing/add_folder_member call.
I tried to set up the API call using the information in the documentation.
I added this to the header:
"dropbox-api-select-admin": "dbmid:XXXX",
The body contains this:
{ "shared_folder_id": "YYYY", "members": [ { "member": { ".tag": "dropbox_id", "dropbox_id": "dbmid:XXXX" }, "access_level": "editor" } ], "quiet": true, "custom_message": "This is a new message." }
But even though I am accessing the API with the admin account, I still get the following error:
{ "error_summary": "no_permission/...", "error": { ".tag": "no_permission" }, "user_message": { "locale": "en", "text": "You don’t have permission to perform this action." } }
When I use the "user" header, I get the following:
{ "error_summary": "access_error/not_a_member/...", "error": { ".tag": "access_error", "access_error": { ".tag": "not_a_member" } }, "user_message": { "locale": "en", "text": "You aren’t a member of this shared folder." } }
May you help me to solve this issue?
Thank you in advance!
Tereza
Apologies for the confusion; I was overly broad in my earlier message. While you can use /2/sharing/add_folder_member to add individual members or groups to shared folders, for team folders in particular you can only add groups, not individual members.
If you try the above again, using the 'Dropbox-API-Select-Admin' header, but specifying a group ID as the "dropbox_id", instead of a specific member ID, that should work.
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.
Sound good? Let's get started.Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!