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

Poui's avatar
Poui
Helpful | Level 5
2 years ago

Can't get shared folder id of folders i create inside a shared folder

I want to share a folder inside a team space to a specific people but i can't find the shared id of that created folder
The response when created the folder with the https://api.dropboxapi.com/2/files/create_folder_v2 endpoint : 

{
    "metadata": {
        "name": "TEST3",
        "path_lower": "/XXX/XXXX/test3",
        "path_display": "/XXX/XXXX/TEST3",
        "parent_shared_folder_id": "0000000",
        "id": "id:XXXXXXXX",
        "sharing_info": {
            "read_only": false,
            "parent_shared_folder_id": "0000000",
            "traverse_only": false,
            "no_access": false
        }
    }
}
"entries": [
        {
            ".tag": "folder",
            "name": "TEST3",
            "path_lower": "/XXX/XXXX/test3",
            "path_display": "/XXX/XXXX/test3",
            "parent_shared_folder_id": "0000000",
            "id": "id:XXXXXXXX",
            "sharing_info": {
                "read_only": false,
                "parent_shared_folder_id": "0000000",
                "traverse_only": false,
                "no_access": false
            }
        }
    ]
There isn't any "shared_folder_id" even when i use the https://api.dropboxapi.com/2/files/list_folder endpoint
  • Hi again Poui,

    In general, for either team or personal accounts, you can share project folder between team member/users and that folder will be hidden for all other that don't participate to particular folder sharing. For team account, it might be easier a project folder to be created by the admin and give to desired team members (project participants) access to there. 🤔 The choice is yours.

  • Hi Poui,

    Using /2/files/create_folder_v2, you're creating a regular folder, not shared one! 😉 That's why there is not a 'shared_folder_id' in metadata.sharing_info. This field is optional and exists only when real shared folder is "on focus" (no the case now). You can share a existing folder (or create new shared folder) using /2/sharing/share_folder. The 'shared_folder_id' is mandatory (not an optional) in this endpoint's result. 🙂 That's it.

    Hope this helps.

    • Poui's avatar
      Poui
      Helpful | Level 5

      Hi, thanks for the response and clarification.
      Here is the issue I have :
      We're a team that have a lot of projects, but each person works on his projects with a small part of the team, most of the time 3 ~ 4.
      The issue is that everyone automatically gets on his Dropbox the new created folder and I want to make that folder only accessible to the person who made the project and his related Teams
      I thought the best way to do it was to "unshare" the folder, so it disappears, then mount it for the specified user.

      Do you think there is a more optimal way to do it ?

      • Здравко's avatar
        Здравко
        Legendary | Level 20

        Hi again Poui,

        In general, for either team or personal accounts, you can share project folder between team member/users and that folder will be hidden for all other that don't participate to particular folder sharing. For team account, it might be easier a project folder to be created by the admin and give to desired team members (project participants) access to there. 🤔 The choice is yours.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,882 PostsLatest Activity: 3 years ago
325 Following

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 or Facebook.

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!