Want to know more about Dash? Check out how Amy uses Dropbox and Dash to make her day easier here!
Forum Discussion
alekso89
25 days agoHelpful | Level 6
How to work with Team Folder?
Hi everyone!
We have a global folder that all team members have access to.
I am developing an application that will perform certain functions:
- display all subfolders or search for the desired one
- create new subfolders
- renaming subfolders
- deleting subfolders
- upload files to the desired subfolders
Which APIs should I pay attention to?
I tried one API, through the generation of a token using the application keys, it gives an error. There is probably confusion in the documentation and I misunderstood the whole process.
Hi alekso89
I forgot to add, since you are working with a team, by default, API calls to the Dropbox API operate in the "member folder" of the connected account, not the "team space". That means that by default, the contents of the team space will not be found.
You can configure API calls to operate in the "team space" instead though, in order to interact with files/folders in the team space. To do so, you'll need to set the "Dropbox-API-Path-Root" header. You can find information on how to use this in the Team Files Guide.
More specifically, you will want to follow the guidance provided above if you are looking to perform functions on the "GlobalTeamFolder".
2 Replies
- DB-Des25 days ago
Dropbox Community Moderator
Hi alekso89
I forgot to add, since you are working with a team, by default, API calls to the Dropbox API operate in the "member folder" of the connected account, not the "team space". That means that by default, the contents of the team space will not be found.
You can configure API calls to operate in the "team space" instead though, in order to interact with files/folders in the team space. To do so, you'll need to set the "Dropbox-API-Path-Root" header. You can find information on how to use this in the Team Files Guide.
More specifically, you will want to follow the guidance provided above if you are looking to perform functions on the "GlobalTeamFolder".
- DB-Des25 days ago
Dropbox Community Moderator
Hi alekso89,
Dropbox does offer an API you can use for listing, uploading, and downloading files, among other operations. You can find everything you need to get started with the Dropbox API, including documentation, tutorials, and SDKs here:
https://www.dropbox.com/developers
For your specific enquiries:
- Endpoints /2/files/list_folder/[continue] and /2/files/search_v2 can be used to display all subfolders and search, respectively.
- Endpoint /2/files/create_folder can be used to create new (sub)folders.
- Endpoint /2/files/move_v2 can be used to rename subfolders.
- Endpoint /2/files/delete_v2 can be used to delete subfolders.
- Endpoint /2/files/upload can be used to upload files.
As far as the error you are encountering, while the /2/files/list_folder endpoint supports "Basic" authorization, it is used to supply an app key and secret to list the contents of a shared link. The app key and secret identify the app, and the access to the listing is enabled by the shared link itself. If you use "Basic" authorization without a shared link though, you will get that error.
The "Bearer" authorization, however, can be used to supply an access token to list the contents of a folder in the connected account. The access token identifies an app and account pair, and enables access to that account.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,018 PostsLatest Activity: 2 hours ago
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 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!