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.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

Business Endpoint - create a team folder

Business Endpoint - create a team folder

mrozak
Explorer | Level 4

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

5 Replies 5

Greg-DB
Dropbox Staff

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

mrozak
Explorer | Level 4

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.

Greg-DB
Dropbox Staff

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.

mrozak
Explorer | Level 4

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

Greg-DB
Dropbox Staff

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    mrozak Explorer | Level 4
What do Dropbox user levels mean?