Announcements
Do you have an idea for Dropbox Paper? Share it with us here!
Highlighted

Re: is_team_folder returns false for team folders

Explorer | Level 4

6598198444 is the shared_folder_id of the WIP Folder folder, not the parent team folder. How do I get the parent team folder id?

Reply
Loading...

Re: is_team_folder returns false for team folders

Star Collaborator | Level 18

Empty folder name: ""

"parent_folder_name": "",
Reply
Loading...

Re: is_team_folder returns false for team folders

Explorer | Level 4

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.

Reply
Loading...

Re: is_team_folder returns false for team folders

Star Collaborator | Level 18

slightly smiling face Where comes the result you has initially post from? thinking face

Reply
Loading...

Re: is_team_folder returns false for team folders

Dropboxer

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

 

 

 

 

Reply
Loading...

Re: is_team_folder returns false for team folders

Explorer | Level 4

Got it, thanks.

Reply
Loading...
API Support

Have a question? Our Dropbox Community is here to help you find an answer!
You won’t have to wait too long for a reply, but why not learn more about the Community while you’re here.

Not the right discussion for you? Find out what else our Community has to say about API Support.

Or, search our Help Center for even more.