<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to access Team Folders with Java API ? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/271239#M16037</link>
    <description>&lt;P&gt;Hi, I'm using dropbox V2 API with the Java library:&amp;nbsp;dropbox-sdk-java&lt;/P&gt;&lt;P&gt;While I can access all team member's folders I cannot figure out how to access the global Team Folders.&lt;/P&gt;&lt;P&gt;Any hint ?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Amedeo&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:14:13 GMT</pubDate>
    <dc:creator>amedeomantica</dc:creator>
    <dc:date>2019-05-29T09:14:13Z</dc:date>
    <item>
      <title>How to access Team Folders with Java API ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/271239#M16037</link>
      <description>&lt;P&gt;Hi, I'm using dropbox V2 API with the Java library:&amp;nbsp;dropbox-sdk-java&lt;/P&gt;&lt;P&gt;While I can access all team member's folders I cannot figure out how to access the global Team Folders.&lt;/P&gt;&lt;P&gt;Any hint ?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Amedeo&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:14:13 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/271239#M16037</guid>
      <dc:creator>amedeomantica</dc:creator>
      <dc:date>2019-05-29T09:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Team Folders with Java API ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/271290#M16045</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/653639"&gt;@amedeomantica&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you clarify if this is a team-linked app, or a user-based app being linked to a team-based account?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In either case, I would suggest our&amp;nbsp;namespace reference guide as a resource that may help with resolving this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/reference/namespace-guide" target="_blank"&gt;https://www.dropbox.com/developers/reference/namespace-guide&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of specific interest (if you are using a team-linked app) will be the namespacesList() and namespacesListContinue() methods to retrieve Team Folder namespace IDs:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;DbxTeamClientV2 client = new DbxTeamClientV2(config, ACCESS_TOKEN);
TeamNamespacesListResult namespaces = client.team().namespacesList(); // with an optional limit param&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Within the results of that call, you can examine the NamespaceType value to determine what kind of folder it is:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;for ( NamespaceMetadata namespace : namespaces.getNamespaces()) {
    if ( namespace.getNamespaceType() == NamespaceType.TEAM_FOLDER ) {&lt;BR /&gt;        System.out.println("Team Folder: " + namespace.getName());&lt;BR /&gt;    }
}&lt;/PRE&gt;
&lt;P&gt;And once you have that you can use the namespace ID (&amp;nbsp;getNamespaceId() ) in other calls to traverse the Team Folder. Be aware you may need to prefix the namespace ID with "ns:" for it to be an acceptable path parameter to methods like listFolder() and you will need to impersonate (asMember()) users with appropriate access to any given folder to list its contents.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Chuck&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 19:15:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/271290#M16045</guid>
      <dc:creator>chirstius</dc:creator>
      <dc:date>2018-04-04T19:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Team Folders with Java API ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/271637#M16089</link>
      <description>&lt;P&gt;Hi @chirstius,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mine is a team linked app with "&lt;SPAN&gt;Team member file access"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed your suggestion in order to get the namespaces list and find the team folder.&lt;/P&gt;&lt;P&gt;Hovewer if I try to list team folder files I go into error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Caused by: com.dropbox.core.v2.files.ListFolderErrorException: Exception in 2/files/list_folder: {".tag":"path","path":"not_found"}
	at com.dropbox.core.v2.files.DbxUserFilesRequests.listFolder(DbxUserFilesRequests.java:1425)
	at com.dropbox.core.v2.files.DbxUserFilesRequests.listFolder(DbxUserFilesRequests.java:1466)&lt;/PRE&gt;&lt;P&gt;If I try any other namespace ( member folders, shared folders ) everything works.&lt;/P&gt;&lt;P&gt;Any idea ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Apr 2018 15:56:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/271637#M16089</guid>
      <dc:creator>amedeomantica</dc:creator>
      <dc:date>2018-04-07T15:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Team Folders with Java API ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/271826#M16110</link>
      <description>&lt;P&gt;Are you certain the&amp;nbsp;member ID you are using to access the team folder actually has access to it? You may need to switch to a different user via asMember(). Can you validate that first? Then we can dig a little deeper...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Chuck&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 17:01:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/271826#M16110</guid>
      <dc:creator>chirstius</dc:creator>
      <dc:date>2018-04-09T17:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Team Folders with Java API ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/272464#M16176</link>
      <description>Yeah, the member is correct and have access to the folder (outside the API)</description>
      <pubDate>Sat, 14 Apr 2018 08:02:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/272464#M16176</guid>
      <dc:creator>amedeomantica</dc:creator>
      <dc:date>2018-04-14T08:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Team Folders with Java API ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/272877#M16212</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/653639"&gt;@amedeomantica&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you able to access other Team Folders as that user? Is it just a single specific folder that is failing or all Team Folders?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if you wouldn't mind, can you post a sample of the code you are using to list the Team Folder and a recent error response?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Chuck&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 21:09:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/272877#M16212</guid>
      <dc:creator>chirstius</dc:creator>
      <dc:date>2018-04-17T21:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Team Folders with Java API ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/273273#M16256</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/640338"&gt;@chirstius&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Here the relevant code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;private DbxTeamClientV2 client;

DbxRequestConfig config = DbxRequestConfig.newBuilder("something").build();

client = new DbxTeamClientV2(config, accessToken);

public DbxClientV2 memberClient() {
    return client.asMember("dbmid:userIdWithFullAccess");
}

public NamespaceMetadata teamFolderNameSpace() throws DbxException {

    TeamNamespacesListResult namespaces = client.team().namespacesList();

    for ( NamespaceMetadata namespace : namespaces.getNamespaces()) {&lt;BR /&gt;        //this correctly list all the available namespaces, including the team folder
        log.info(namespace.getName() + "/" + namespace.getNamespaceId));
    }
&lt;BR /&gt;    //correctly returns the teamfolder
    for ( NamespaceMetadata namespace : namespaces.getNamespaces()) {
        if ( namespace.getNamespaceType() == NamespaceType.TEAM_FOLDER ) {
            return namespace;
        }
    }
    return null;
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;public &lt;/SPAN&gt;Result test() &lt;SPAN&gt;throws &lt;/SPAN&gt;Exception {&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;final &lt;/SPAN&gt;NamespaceMetadata namespaceMetadata = &lt;SPAN&gt;dropBoxConnection&lt;/SPAN&gt;.teamFolderNameSpace();&lt;BR /&gt;    &lt;SPAN&gt;if&lt;/SPAN&gt;(namespaceMetadata != &lt;SPAN&gt;null&lt;/SPAN&gt;) {&lt;BR /&gt;        String namespaceId = namespaceMetadata.getNamespaceId();&lt;BR /&gt;&lt;BR /&gt;        // MEDIA folder exists and I access it from web/desktop (I'm the same user as memberClient)&lt;BR /&gt;        // But is not working from here&lt;BR /&gt;        // also tried without "MEDIA" (listing team folder root), no luck&lt;BR /&gt;        String path = &lt;SPAN&gt;"ns:" &lt;/SPAN&gt;+ namespaceId + &lt;SPAN&gt;"/MEDIA"&lt;/SPAN&gt;;&lt;BR /&gt;&lt;BR /&gt;        //This works, putting any namespace ID (I can access), except main team folder&lt;BR /&gt;        //String path = "ns:ANY_OTHER_NAMESPACE_ID_I_CAN_ACCESS";&lt;BR /&gt;&lt;BR /&gt;        &lt;SPAN&gt;log&lt;/SPAN&gt;.info(path);&lt;BR /&gt;&lt;BR /&gt;        &lt;SPAN&gt;final &lt;/SPAN&gt;ListFolderResult listFolderResult = &lt;SPAN&gt;dropBoxConnection&lt;/SPAN&gt;.memberClient().files().listFolder(path);&lt;BR /&gt;        listFolderResult.getEntries().forEach(r -&amp;gt; {&lt;BR /&gt;            &lt;SPAN&gt;log&lt;/SPAN&gt;.info(r.getName());&lt;BR /&gt;        });&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;return &lt;/SPAN&gt;&lt;SPAN&gt;ok&lt;/SPAN&gt;(&lt;SPAN&gt;"ok"&lt;/SPAN&gt;);&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Caused by: com.dropbox.core.v2.files.ListFolderErrorException: Exception in 2/files/list_folder: {".tag":"path","path":"not_found"}
	at com.dropbox.core.v2.files.DbxUserFilesRequests.listFolder(DbxUserFilesRequests.java:1425)
	at com.dropbox.core.v2.files.DbxUserFilesRequests.listFolder(DbxUserFilesRequests.java:1466)
	at controllers.HomeController.test(HomeController.java:133)
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 10:14:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/273273#M16256</guid>
      <dc:creator>amedeomantica</dc:creator>
      <dc:date>2018-04-20T10:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Team Folders with Java API ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/273366#M16266</link>
      <description>&lt;P&gt;Thank you for posting those samples&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/653639"&gt;@amedeomantica&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because your Dropbox Team uses team space and member folders I'd like to make a suggestion. First, make sure you have the latest Java SDK (3.0.7).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then add a call to get the current account information and root namespace:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;FullAccount account = adminClient.users().getCurrentAccount();
String rootNS = account.getRootInfo().getRootNamespaceId();&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, replace your call to listFolder() with this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;final ListFolderResult listFolderResult = dropBoxConnection.memberClient().withPathRoot(PathRoot.namespaceId(rootNS)).files().listFolder(path);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there are issues with that, you can try varying the composition of your path string - try just using the&amp;nbsp;literal string pathname&amp;nbsp;vs the "ns:" format. Remember that all pathing will be relative to the root namespace (the Team root folder).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What the withPathRoot() method does is to "root" the chained API call at the given namespace. In your case, while you may have the proper namespace ID for the Team Folder, if you are not accessing it via the root namespace ID, it will not be visible to your user. This is because by default all calls without an explicit path root set are rooted in the home namespace (your user folder), not the team root where Team Folders live.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest looking over&amp;nbsp;"User's Home Folder &amp;amp; Team Root Folder" and the "Using a Namespace to Identify Content" in the Namespace Guide:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/reference/namespace-guide" target="_blank"&gt;https://www.dropbox.com/developers/reference/namespace-guide&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully, this gets you past the error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Chuck&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 21:57:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/273366#M16266</guid>
      <dc:creator>chirstius</dc:creator>
      <dc:date>2018-04-20T21:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Team Folders with Java API ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/273402#M16269</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/640338"&gt;@chirstius&lt;/a&gt;&amp;nbsp;it worked (withPathRoot) !! Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 21 Apr 2018 14:05:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/273402#M16269</guid>
      <dc:creator>amedeomantica</dc:creator>
      <dc:date>2018-04-21T14:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to access Team Folders with Java API ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/273576#M16281</link>
      <description>&lt;P&gt;Glad to hear it, don't hesitate to reach out again if there is anything else you need.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 16:29:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-access-Team-Folders-with-Java-API/m-p/273576#M16281</guid>
      <dc:creator>chirstius</dc:creator>
      <dc:date>2018-04-23T16:29:21Z</dc:date>
    </item>
  </channel>
</rss>

