Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

chrismcfarling's avatar
chrismcfarling
Helpful | Level 5
7 years ago
Solved

is_team_folder returns false for team folders

I'm using DropBox Business Standard. The top level team space is My Team. Within that is a folder name WIP Folder. The list_folders API command shows that WIP Folder is not a team folder as is_team_folder is set to false. WIP Folder is a team folder though, it has the team folder icon referenced here:

https://help.dropbox.com/teams-admins/team-member/team-folders

In fact every folder returns "is_team_folder": false, I'm just using WIP Folder as an example. Here's the list_folders output.

Ehy is it not "is_team_folder": true?

{
      "access_type": {
        ".tag": "editor"
      },
      "is_inside_team_folder": true,
      "is_team_folder": false,
      "owner_team": {
        "id": "dbtid:AACFOnUrcjz66yWgLJTSWqQf0kuygwfhieh",
        "name": "My Team"
      },
      "parent_folder_name": "",
      "name": "WIP Folder",
      "policy": {
        "member_policy": {
          ".tag": "anyone"
        },
        "resolved_member_policy": {
          ".tag": "anyone"
        },
        "acl_update_policy": {
          ".tag": "editors"
        },
        "shared_link_policy": {
          ".tag": "anyone"
        },
        "viewer_info_policy": {
          ".tag": "enabled"
        }
      },
      "preview_url": "https://www.dropbox.com/scl/fo/zcabfx72968vk68a3bc19/AABxxIGsJbwfVYUawTYfgdfv?dl=0",
      "shared_folder_id": "6598198444",
      "time_invited": "2019-11-06T23:09:57Z",
      "access_inheritance": {
        ".tag": "inherit"
      }
    }
  • Greg-DB's avatar
    Greg-DB
    7 years ago

    chrismcfarling There are a few ways you can get the team space ID. For instance, you can get it from the 'root_info' returned by /2/users/get_current_account:

     

    curl -X POST https://api.dropboxapi.com/2/users/get_current_account \
        --header "Authorization: Bearer <redacted>"
    
    # {
    # <redacted>
    #   "root_info": {
    #     ".tag": "team",
    #     "root_namespace_id": "1990815600",
    #     "home_namespace_id": "1990696960",
    #     "home_path": "/db test"
    #   }
    # }

     

     

    Or, if you're using a Dropbox Business API app with the team member file access permission, you can get it from /2/team/team_folder/list[/continue] or /2/team/namespaces/list[/continue]:

     

    curl -X POST https://api.dropboxapi.com/2/team/team_folder/list \
        --header "Authorization: Bearer <redacted>" \
        --header "Content-Type: application/json" \
        --data "{}"
    
    # {
    #   "team_folders": [
    #     {
    #       "team_folder_id": "1990815600",
    #       "name": "<redacted>",
    #       "status": {
    #         ".tag": "active"
    #       },
    #       "is_team_shared_dropbox": true,
    #       "sync_setting": {
    #         ".tag": "default"
    #       },
    #       "content_sync_settings": []
    #     }
    #   ],
    # <redacted>
    # }
    curl -X POST https://api.dropboxapi.com/2/team/namespaces/list \
        --header "Authorization: Bearer <redacted>" \
        --header "Content-Type: application/json" \
        --data "{}"
    
    # {
    #   "namespaces": [
    #     {
    #       "name": "<redacted>",
    #       "namespace_id": "1990815600",
    #       "namespace_type": {
    #         ".tag": "team_folder"
    #       }
    #     },
    # <redacted>
    #   ],
    # <redacted>
    # }

    I recommend reading the Namespace Guide as it goes over some of these topics.

     

     

     

     

15 Replies

Replies have been turned off for this discussion
  • chrismcfarling's avatar
    chrismcfarling
    Helpful | Level 5
    7 years ago

    I'm not sure what that means. In Gregs last example he used the shared_folder_id of the top level team folder. Nothing I've seen so far shows me how to retrieve the shared_folder_id of that top level folder.

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

    :slight_smile: Where comes the result you has initially post from? :thinking:

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    7 years ago

    chrismcfarling There are a few ways you can get the team space ID. For instance, you can get it from the 'root_info' returned by /2/users/get_current_account:

     

    curl -X POST https://api.dropboxapi.com/2/users/get_current_account \
        --header "Authorization: Bearer <redacted>"
    
    # {
    # <redacted>
    #   "root_info": {
    #     ".tag": "team",
    #     "root_namespace_id": "1990815600",
    #     "home_namespace_id": "1990696960",
    #     "home_path": "/db test"
    #   }
    # }

     

     

    Or, if you're using a Dropbox Business API app with the team member file access permission, you can get it from /2/team/team_folder/list[/continue] or /2/team/namespaces/list[/continue]:

     

    curl -X POST https://api.dropboxapi.com/2/team/team_folder/list \
        --header "Authorization: Bearer <redacted>" \
        --header "Content-Type: application/json" \
        --data "{}"
    
    # {
    #   "team_folders": [
    #     {
    #       "team_folder_id": "1990815600",
    #       "name": "<redacted>",
    #       "status": {
    #         ".tag": "active"
    #       },
    #       "is_team_shared_dropbox": true,
    #       "sync_setting": {
    #         ".tag": "default"
    #       },
    #       "content_sync_settings": []
    #     }
    #   ],
    # <redacted>
    # }
    curl -X POST https://api.dropboxapi.com/2/team/namespaces/list \
        --header "Authorization: Bearer <redacted>" \
        --header "Content-Type: application/json" \
        --data "{}"
    
    # {
    #   "namespaces": [
    #     {
    #       "name": "<redacted>",
    #       "namespace_id": "1990815600",
    #       "namespace_type": {
    #         ".tag": "team_folder"
    #       }
    #     },
    # <redacted>
    #   ],
    # <redacted>
    # }

    I recommend reading the Namespace Guide as it goes over some of these topics.

     

     

     

     

About Dropbox API Support & Feedback

Node avatar for 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!