Discuss Dropbox Developer & API
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 🤦:male_sign: 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?
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.
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!