We’re aware of an issue causing slower load times on the Dropbox Community forum. It should be resolved soon. Thanks for your patience!
Forum Discussion
bauerb
5 years agoExplorer | Level 3
How to navigate to Team root with JDK
I have been trying all day to access my team's root folder with the Java SDK and I haven't been able to find any documentation.
My folder structure is like this:
/MyName
/Folder-I-Want-To-Access
/Other-Folder-I-Want-To-Access
Unfortunately I'm trying to do this in Rhino, so apologies that this doesn't look like normal Java 🤦♂️ I don't really know where to go from here:
var config = new com.dropbox.core.DbxRequestConfig("dropbox/java-tutorial", "en_US");
var teamClient = new com.dropbox.core.v2.DbxTeamClientV2(config, accessToken);
var client = teamClient.asMember('my-id');
the TeamClient doesn't have the file access methods, but the individual Client always has it's root set to /MyName. How can I navigate paths with the JDK?
1 Reply
- Greg-DB5 years ago
Dropbox Community Moderator
It sounds like you want access the folders in your "team space". By default, Dropbox API calls operate in the "member folder", not the team space, but you can configure them to operate in the team space when desired, by setting the "Dropbox-API-Path-Root" header. For information on how to do so, please refer to the Team Files Guide.
With the Java SDK in particular, you can set the "Dropbox-API-Path-Root" header using the DbxClientV2.withPathRoot method.
About Discuss Dropbox Developer & API
Make connections with 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!