<?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 Getting content of folders using Dropbox API in Python not working anymore since last update in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-content-of-folders-using-Dropbox-API-in-Python-not/m-p/729113#M32241</link>
    <description>&lt;P&gt;There has been an update in Dropbox and also in the API somewhere in the last week. I have a Python script to retrieve the content of a Dropbox folder and it is not working anymore. The call was just as simple as:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yannick11_0-1699874372287.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/42016iC5567D2D8823D32C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yannick11_0-1699874372287.png" alt="yannick11_0-1699874372287.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- dbx: the active connection to Dropbox (this is still working correct)&lt;/P&gt;&lt;P&gt;- folder_path: the directory in which to look for&lt;/P&gt;&lt;P&gt;- recursive: True means to the deepest level and False means only in the specified folder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I came along a blog post (&lt;A href="https://dropbox.tech/developers/api-updates-to-better-support-team-spaces" target="_blank"&gt;https://dropbox.tech/developers/api-updates-to-better-support-team-spaces&lt;/A&gt;), which confirms that there has changed something and i think the issue has to do with the paragraph shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yannick11_1-1699874534167.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/42017iB05F541A078A4A11/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yannick11_1-1699874534167.png" alt="yannick11_1-1699874534167.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried a couple of things to change in the folder_path argument, because i thought the root path has been changed since the update, but without any success so far.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain me what i have to change to being able to retrieve the content of folders again via the Dropbox API in Python?&lt;/P&gt;</description>
    <pubDate>Mon, 13 Nov 2023 11:24:57 GMT</pubDate>
    <dc:creator>yannick11</dc:creator>
    <dc:date>2023-11-13T11:24:57Z</dc:date>
    <item>
      <title>Getting content of folders using Dropbox API in Python not working anymore since last update</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-content-of-folders-using-Dropbox-API-in-Python-not/m-p/729113#M32241</link>
      <description>&lt;P&gt;There has been an update in Dropbox and also in the API somewhere in the last week. I have a Python script to retrieve the content of a Dropbox folder and it is not working anymore. The call was just as simple as:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yannick11_0-1699874372287.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/42016iC5567D2D8823D32C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yannick11_0-1699874372287.png" alt="yannick11_0-1699874372287.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- dbx: the active connection to Dropbox (this is still working correct)&lt;/P&gt;&lt;P&gt;- folder_path: the directory in which to look for&lt;/P&gt;&lt;P&gt;- recursive: True means to the deepest level and False means only in the specified folder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I came along a blog post (&lt;A href="https://dropbox.tech/developers/api-updates-to-better-support-team-spaces" target="_blank"&gt;https://dropbox.tech/developers/api-updates-to-better-support-team-spaces&lt;/A&gt;), which confirms that there has changed something and i think the issue has to do with the paragraph shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yannick11_1-1699874534167.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/42017iB05F541A078A4A11/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yannick11_1-1699874534167.png" alt="yannick11_1-1699874534167.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried a couple of things to change in the folder_path argument, because i thought the root path has been changed since the update, but without any success so far.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain me what i have to change to being able to retrieve the content of folders again via the Dropbox API in Python?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 11:24:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-content-of-folders-using-Dropbox-API-in-Python-not/m-p/729113#M32241</guid>
      <dc:creator>yannick11</dc:creator>
      <dc:date>2023-11-13T11:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Getting content of folders using Dropbox API in Python not working anymore since last update</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-content-of-folders-using-Dropbox-API-in-Python-not/m-p/729184#M32249</link>
      <description>&lt;P&gt;Can you clarify what you mean when you say "it is not working anymore"? For instance, what error or unexpected output do you get?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For reference, regardless of what feature set your team is using exactly, if you're trying to access a "team space", you'd need to get the root namespace ID from &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.users_get_current_account" target="_blank"&gt;users_get_current_account&lt;/A&gt;, and use that as the root in &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.with_path_root" target="_blank"&gt;with_path_root&lt;/A&gt; to access the team space. You can find more information in the &lt;A href="https://developers.dropbox.com/dbx-team-files-guide" target="_blank"&gt;Team Files Guide&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 15:05:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-content-of-folders-using-Dropbox-API-in-Python-not/m-p/729184#M32249</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-11-13T15:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting content of folders using Dropbox API in Python not working anymore since last update</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-content-of-folders-using-Dropbox-API-in-Python-not/m-p/729358#M32262</link>
      <description>&lt;P&gt;I got the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yannick11_0-1699953203440.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/42031i593EBA22EE0FDC9E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yannick11_0-1699953203440.png" alt="yannick11_0-1699953203440.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This confirmed for me that it had to do something with the root_path. You pointed me in the right direction to use 'with_path_root' and i got it working again :).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For people having the same issue in the future, this is how i got it working again:&lt;/P&gt;&lt;P&gt;I use &lt;A href="https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth-scopes.py" target="_self"&gt;this&lt;/A&gt;&amp;nbsp;code from github. The line with 'dbx.users_get_current_account' in the end is not sufficient anymore now. So, i changed&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;dbx.users_get_current_account()&lt;/LI-CODE&gt;&lt;P&gt;to&lt;/P&gt;&lt;LI-CODE lang="python"&gt;root_namespace_id = dbx.users_get_current_account().root_info.root_namespace_id
dbx = dbx.with_path_root(dropbox.common.PathRoot('root', value = root_namespace_id))&lt;/LI-CODE&gt;&lt;P&gt;and it works completely fine again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks @Greg-DB!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 09:27:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-content-of-folders-using-Dropbox-API-in-Python-not/m-p/729358#M32262</guid>
      <dc:creator>yannick11</dc:creator>
      <dc:date>2023-11-14T09:27:35Z</dc:date>
    </item>
  </channel>
</rss>

