We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Takashi Homma
3 years agoExplorer | Level 4
I would like to know whether the folder is under a team folder or a user folder
I would like to know whether the folder that specified in the Chooser widget is under a team folder or a user folder. Is there an appropriate API for this? I guess it is available by folder id and g...
- 3 years ago
Yes, to get information about a specific item, you would use /2/files/get_metadata.
Takashi Homma
3 years agoExplorer | Level 4
I'll make 2 API requests.
- call to /2/files/get_metadata API with folder ID without Dropbox-API-Path-Root header
- if receive code 200 response, it means user folder.
- if receive code 409 response, then continue to next.
- call to /2/files/get_metadata API with same folder ID and Dropbox-API-Path-Root header
- if receive code 200 response, it means team folder.
Do you think this is appropriate workflow?
Greg-DB
Dropbox Community Moderator
3 years agoTakashi Homma Yes, additionally note that some teams currently have a team space, and some don't. Make sure to read through the Team Files Guide to understand how the different configurations work.
Also, note that there may be multiple reasons an endpoint would return a 409, so always check the error in the response body for the specific error case. You can find the errors for each endpoint in the endpoint documentation, such as for /2/files/get_metadata.
About 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!