<?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 Re: dbxClient.files().listFolder(&amp;quot;&amp;quot;) only returns 1 folder in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627135#M29007</link>
    <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1579762"&gt;@trithanhnguyen&lt;/a&gt; Yes, as Здравко indicated, it sounds like you're looking for the contents of your "team space", but note that by default, API calls operate in the "member folder" of the connected account, not the "team space", so you won't see the contents of your team space when making API calls by default. You can configure API calls to operate in the "team space" instead though. To do so, you'll need to set the "Dropbox-Api-Path-Root" header. You can find information on this in &lt;A href="https://developers.dropbox.com/dbx-team-files-guide" target="_blank"&gt;the Team Files Guide&lt;/A&gt;. With the Java SDK, you can set that header using &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.2/com/dropbox/core/v2/DbxClientV2.html#withPathRoot(com.dropbox.core.v2.common.PathRoot)" target="_self"&gt;withPathRoot&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Oct 2022 21:00:25 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2022-10-04T21:00:25Z</dc:date>
    <item>
      <title>dbxClient.files().listFolder("") only returns 1 folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627089#M29003</link>
      <description>&lt;P&gt;I want to list all the files under my member ID. I use the following code and it only show 1 folder even though I have 8 folders starting from root.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;DbxClientV2 dbxClient &lt;/SPAN&gt;= &lt;SPAN&gt;dbxTeamClient&lt;/SPAN&gt;.asMember(teamMemberId);&lt;BR /&gt;&lt;SPAN&gt;ListFolderResult &lt;/SPAN&gt;fileRes = &lt;SPAN&gt;dbxClient&lt;/SPAN&gt;.files().listFolder(&lt;SPAN&gt;""&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;List&lt;/SPAN&gt;&amp;lt;&lt;SPAN&gt;Metadata&lt;/SPAN&gt;&amp;gt; folders = fileRes.getEntries();&lt;BR /&gt;&lt;SPAN&gt;String &lt;/SPAN&gt;metaDataCursor = fileRes.getCursor();&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while &lt;/SPAN&gt;(&lt;SPAN&gt;true&lt;/SPAN&gt;)&lt;BR /&gt;{&lt;BR /&gt;    &lt;SPAN&gt;for &lt;/SPAN&gt;(&lt;SPAN&gt;Metadata metadata &lt;/SPAN&gt;: folders)&lt;BR /&gt;    {&lt;BR /&gt;        &lt;SPAN&gt;String type&lt;/SPAN&gt;;&lt;BR /&gt;        &lt;SPAN&gt;String details&lt;/SPAN&gt;;&lt;BR /&gt;        &lt;SPAN&gt;if &lt;/SPAN&gt;(&lt;SPAN&gt;metadata &lt;/SPAN&gt;&lt;SPAN&gt;instanceof &lt;/SPAN&gt;&lt;SPAN&gt;FileMetadata&lt;/SPAN&gt;)&lt;BR /&gt;        {&lt;BR /&gt;            &lt;SPAN&gt;FileMetadata fileMetadata &lt;/SPAN&gt;= (&lt;SPAN&gt;FileMetadata&lt;/SPAN&gt;) &lt;SPAN&gt;metadata&lt;/SPAN&gt;;&lt;BR /&gt;            &lt;SPAN&gt;type &lt;/SPAN&gt;= &lt;SPAN&gt;"file"&lt;/SPAN&gt;;&lt;BR /&gt;            &lt;SPAN&gt;details &lt;/SPAN&gt;= &lt;SPAN&gt;"(rev=" &lt;/SPAN&gt;+ &lt;SPAN&gt;fileMetadata&lt;/SPAN&gt;.getRev() + &lt;SPAN&gt;")"&lt;/SPAN&gt;;&lt;BR /&gt;        }&lt;BR /&gt;        &lt;SPAN&gt;else if &lt;/SPAN&gt;(&lt;SPAN&gt;metadata &lt;/SPAN&gt;&lt;SPAN&gt;instanceof &lt;/SPAN&gt;&lt;SPAN&gt;FolderMetadata&lt;/SPAN&gt;)&lt;BR /&gt;        {&lt;BR /&gt;            &lt;SPAN&gt;FolderMetadata folderMetadata &lt;/SPAN&gt;= (&lt;SPAN&gt;FolderMetadata&lt;/SPAN&gt;) &lt;SPAN&gt;metadata&lt;/SPAN&gt;;&lt;BR /&gt;            &lt;SPAN&gt;type &lt;/SPAN&gt;= &lt;SPAN&gt;"folder"&lt;/SPAN&gt;;&lt;BR /&gt;            &lt;SPAN&gt;details &lt;/SPAN&gt;= &lt;SPAN&gt;folderMetadata&lt;/SPAN&gt;.getSharingInfo() != &lt;SPAN&gt;null &lt;/SPAN&gt;? &lt;SPAN&gt;"(shared)" &lt;/SPAN&gt;: &lt;SPAN&gt;""&lt;/SPAN&gt;;&lt;BR /&gt;        }&lt;BR /&gt;        &lt;SPAN&gt;else if &lt;/SPAN&gt;(&lt;SPAN&gt;metadata &lt;/SPAN&gt;&lt;SPAN&gt;instanceof &lt;/SPAN&gt;&lt;SPAN&gt;DeletedMetadata&lt;/SPAN&gt;)&lt;BR /&gt;        {&lt;BR /&gt;            &lt;SPAN&gt;type &lt;/SPAN&gt;= &lt;SPAN&gt;"deleted"&lt;/SPAN&gt;;&lt;BR /&gt;            &lt;SPAN&gt;details &lt;/SPAN&gt;= &lt;SPAN&gt;""&lt;/SPAN&gt;;&lt;BR /&gt;        }&lt;BR /&gt;        &lt;SPAN&gt;else&lt;BR /&gt;&lt;/SPAN&gt;        {&lt;BR /&gt;            &lt;SPAN&gt;throw new &lt;/SPAN&gt;IllegalStateException(&lt;SPAN&gt;"Unrecognized metadata type: " &lt;/SPAN&gt;+ &lt;SPAN&gt;metadata&lt;/SPAN&gt;.getClass());&lt;BR /&gt;        }&lt;BR /&gt;&lt;BR /&gt;        &lt;SPAN&gt;System&lt;/SPAN&gt;.&lt;SPAN&gt;out&lt;/SPAN&gt;.printf(&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;\t&lt;/SPAN&gt;&lt;SPAN&gt;%10s %24s &lt;/SPAN&gt;&lt;SPAN&gt;\"&lt;/SPAN&gt;&lt;SPAN&gt;%s&lt;/SPAN&gt;&lt;SPAN&gt;\"\n&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;, &lt;SPAN&gt;type&lt;/SPAN&gt;, &lt;SPAN&gt;details&lt;/SPAN&gt;, &lt;SPAN&gt;metadata&lt;/SPAN&gt;.getPathLower());&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;if &lt;/SPAN&gt;(!fileRes.getHasMore())&lt;BR /&gt;    {&lt;BR /&gt;        &lt;SPAN&gt;break&lt;/SPAN&gt;;&lt;BR /&gt;    }&lt;BR /&gt;    &lt;SPAN&gt;// update cursor to fetch remaining results&lt;BR /&gt;&lt;/SPAN&gt;   fileRes = &lt;SPAN&gt;dbxClient&lt;/SPAN&gt;.files().listFolderContinue(metaDataCursor);&lt;BR /&gt;   folders = fileRes.getEntries();&lt;BR /&gt;   metaDataCursor = fileRes.getCursor();&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;I then changed my code as the following then it shows the first folder and all the folder and files from that branch but the left 7 folder are not show at all. Any suggestiong to fix it?&lt;BR /&gt;TThank you.&lt;/PRE&gt;
&lt;PRE&gt;&lt;SPAN&gt;DbxClientV2 dbxClient &lt;/SPAN&gt;= &lt;SPAN&gt;dbxTeamClient&lt;/SPAN&gt;.asMember(teamMemberId);&lt;BR /&gt;&lt;SPAN&gt;ListFolderBuilder builder &lt;/SPAN&gt;= &lt;SPAN&gt;dbxClient&lt;/SPAN&gt;.files().listFolderBuilder(&lt;SPAN&gt;""&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;builder&lt;/SPAN&gt;.withRecursive(&lt;SPAN&gt;true&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;ListFolderResult &lt;/SPAN&gt;fileRes = &lt;SPAN&gt;builder&lt;/SPAN&gt;.start();&lt;/PRE&gt;
&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 13:06:55 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627089#M29003</guid>
      <dc:creator>trithanhnguyen</dc:creator>
      <dc:date>2022-10-05T13:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: dbxClient.files().listFolder("") only returns 1 folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627114#M29004</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1579762"&gt;@trithanhnguyen&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I want to list all the files under my member ID. I use the following code and it only show 1 folder even though I have 8 folders starting from root.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You are listing all files in your user/member home folder (recursive eventually). If your rest folders are team folders/spaces then you need to enumerate your root. On personal accounts root matches home, but on business account home is only part on all root content!&lt;/P&gt;&lt;P&gt;Hope this gives direction.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 20:08:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627114#M29004</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-10-04T20:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: dbxClient.files().listFolder("") only returns 1 folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627115#M29005</link>
      <description>&lt;P&gt;From 8 folders I have in my account, 3 of them I created by myself. So at least the list folder API should return that 3 folders, but it did not. Do I need to do some extra setup to list all 3 folders. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 20:13:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627115#M29005</guid>
      <dc:creator>trithanhnguyen</dc:creator>
      <dc:date>2022-10-04T20:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: dbxClient.files().listFolder("") only returns 1 folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627135#M29007</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1579762"&gt;@trithanhnguyen&lt;/a&gt; Yes, as Здравко indicated, it sounds like you're looking for the contents of your "team space", but note that by default, API calls operate in the "member folder" of the connected account, not the "team space", so you won't see the contents of your team space when making API calls by default. You can configure API calls to operate in the "team space" instead though. To do so, you'll need to set the "Dropbox-Api-Path-Root" header. You can find information on this in &lt;A href="https://developers.dropbox.com/dbx-team-files-guide" target="_blank"&gt;the Team Files Guide&lt;/A&gt;. With the Java SDK, you can set that header using &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.2/com/dropbox/core/v2/DbxClientV2.html#withPathRoot(com.dropbox.core.v2.common.PathRoot)" target="_self"&gt;withPathRoot&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 21:00:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627135#M29007</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-10-04T21:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: dbxClient.files().listFolder("") only returns 1 folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627136#M29008</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1579762"&gt;@trithanhnguyen&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;... Do I need to do some extra setup to list all 3 folders. Thanks.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In all cases you need to set your root to appropriate one using &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.2/com/dropbox/core/v2/DbxClientV2.html#withPathRoot(com.dropbox.core.v2.common.PathRoot)" target="_blank" rel="noopener"&gt;withPathRoot&lt;/A&gt; in addition to asMember, if desired folders reside in out of your account's user/member home (as seems it is).&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 21:00:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627136#M29008</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-10-04T21:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: dbxClient.files().listFolder("") only returns 1 folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627144#M29009</link>
      <description>&lt;P&gt;Thank&amp;nbsp;&lt;SPAN&gt;Здравко and Greg,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I set the withPathRoot with my Team Root Namespace then the List Folder API returns all the folders and files under my Team Namespace. I do not want that. I just want to list all the folders and files in my account. There are 3 folders which I created in my personal account. However, when I use this API call:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;ListFolderResult &lt;/SPAN&gt;fileRes = &lt;SPAN&gt;dbxClient&lt;/SPAN&gt;.files().listFolderBuilder(&lt;SPAN&gt;""&lt;/SPAN&gt;).withRecursive(&lt;SPAN&gt;true&lt;/SPAN&gt;).start();&lt;BR /&gt;&lt;BR /&gt;It just returns 1 folder and all the contents under that folder.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 21:20:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627144#M29009</guid>
      <dc:creator>trithanhnguyen</dc:creator>
      <dc:date>2022-10-04T21:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: dbxClient.files().listFolder("") only returns 1 folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627153#M29010</link>
      <description>&lt;P&gt;You can re-produce what I have by create a Dropbox account. Then create 3 folders and upload or create some files and folders under the them. Then write a test program that using the List Folder API on the account. You will see that the API only returns the contents of one folder.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 22:31:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627153#M29010</guid>
      <dc:creator>trithanhnguyen</dc:creator>
      <dc:date>2022-10-04T22:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: dbxClient.files().listFolder("") only returns 1 folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627156#M29011</link>
      <description>&lt;P&gt;The main question is where you have created all those folders? You seems don't use personal, but business&amp;nbsp; account! In such a case when you create a folder aside your home folder you create another team folder (out of your home folder). As Greg noted, by default API uses Home folder (the one you are listing only). To list something outside it, simply you need to get out of your home. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt; That's it. Just use the features mentioned.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 22:38:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627156#M29011</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-10-04T22:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: dbxClient.files().listFolder("") only returns 1 folder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627197#M29014</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 05:32:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dbxClient-files-listFolder-quot-quot-only-returns-1-folder/m-p/627197#M29014</guid>
      <dc:creator>trithanhnguyen</dc:creator>
      <dc:date>2022-10-05T05:32:35Z</dc:date>
    </item>
  </channel>
</rss>

