cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more 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: 

Accessing Team Folders from User integration - and not Business Team integration

Accessing Team Folders from User integration - and not Business Team integration

wojwal_y
Explorer | Level 3

I'm trying to integrate with Dropbox Teams... The integration works fine... I can read/write to Team Folders. And write/read those team folders with Dropbox-API-Path-Root and a namespace of that team folder. But I just got another requirement.

 

The new requirement is actually not to use Team Administrator credentials... Which basically prevents me from using Dropbox Business Endpoints API at all.

 

In Dropbox business - when I use normal user integration with User Endpoints API all file operations happens in their team member (Purple) folder that normally in Dropbox is named as their Firstname/lastname.

So if a user in their Dropbox account has a folder structure like:

 

/John Doe/ (their team member folder)
/Team Folder1/
/Team Folder2/

 

And when I actually integrate with normal user API - Once writting/reading anything in their root folder "/" - I'm actually writting in their "/John Doe/" folder.

 

Question is: With this kind of API integration - can I write/read to Team folders that this user has access to somehow?

3 Replies 3

Greg-DB
Dropbox Staff

Yes, even when an app is not connected to a team itself (i.e., it's not authorized by a team admin to access the Business API functionality), the app can still use the standard Dropbox API functionality to access any files/folders in the account, including the contents of any team folders/space (as long as it isn't sandboxed to an app folder).

 

For instance, while it won't be able to the /2/team/team_folder/* endpoints, it can still use the /2/files/list_folder[/continue] endpoints (optionally with the "Dropbox-API-Path-Root" header if/as needed). When calling /2/files/list_folder, you can start with 'path' being the empty string "" to list the current root (which is determined by the "Dropbox-API-Path-Root" header, or lack thereof). I recommend reading the File Access Guide and Team Files Guide for information on navigating the Dropbox filesystem, including the different team space/team folder configurations. (The "Dropbox-API-Path-Root" header is required to access outside of the member folder.)

wojwal_y
Explorer | Level 3

Hi Greg, 

 

Yeah, I'm familliar with Dropbox-API-Path-Root - and use it with Business Team integration, but in order to use it:

 - I have to know the specific namespace ID, and in order to get it

 - I need to make team/namespaces/list call, which

 - requires me to use Team integration

 

I just tried it, and it works like you suggested, it's just that I know the namespace id fro other team integration. 

 

And my quesiton is - how can I do it just with normal user integration - without team integration at all. 

 

Just thinking - would /sharing/ endpoints from users endpoints give me those Team Folders information/namespaces I'm looking for? Am I thinking right? Just want to make sure this can be done or not?

Greg-DB
Dropbox Staff

Yes, there are a few ways you can navigate and determine the relevant namespace IDs without using team endpoints.

 

For accounts with a team space, you can check /2/users/get_current_account to get the 'root_namespace_id'. Check out the Team Files Guide for information on that.

 

For accounts without a team space, you can list everything under the member's folder, including mounted team folders, using /2/files/list_folder[/continue]. Or, you can use the sharing endpoints such as /2/sharing/list_folders[/continue] or /2/sharing/list_mountable_folders[/continue] to list mounted or unmounted team folders that the account has access to. These will also include shared folders, but you can use the returned metadata to check if any particular entry is a team folder.

Need more support?
Who's talking

Top contributors to this post

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