Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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 get_metadata API.
Yes, to get information about a specific item, you would use /2/files/get_metadata.
Yes, to get information about a specific item, you would use /2/files/get_metadata.
I'll make 2 API requests.
Do you think this is appropriate workflow?
@Takashi Homma wrote: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?
Hi @Takashi Homma,
There is no direct API call that gives you that information. Once you get the file path (in the metadata) you can compare and see if is the residing place of the file in your (or your app' users) personal folder or no. You don't need other API calls - just literal comparison. If you don't have the home folder path yet, only getting metadata for the home folder itself may be needed (in such case you have to use Dropbox-API-Path-Root header) - executed single time.
A good way would be to review your application algorithm, so that can work without such information. Focus on data processing, not where the file(s) comes from - let the user controls this. 😉
Hope this gives direction.
@Takashi 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.
Hi there!
If you need more help you can view your support options (expected response time for a 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!