<?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: Download a file inside a Shared Team Folder using the Python SDK in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-file-inside-a-Shared-Team-Folder-using-the-Python-SDK/m-p/466828#M23806</link>
    <description>&lt;P&gt;I can't say for sure exactly what's happening without seeing the actual values, but if the files are in the connected account, it's better to use paths/IDs everywhere, instead of preview/shared links. That's the more direct way of referencing things and may avoid the missing path values you mentioned, depending on the scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, note that if the files are in the "team space", you do need to set some additional configuration to be able to access them. (API calls operate in the "team member folder" by default, but you can access the "team space" when you need to.) I&amp;nbsp;recommend reading the Team Files Guide first:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/lp/developers/reference/dbx-team-files-guide" target="_self"&gt;https://www.dropbox.com/lp/developers/reference/dbx-team-files-guide&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the Python SDK in particular, you can set that 'Dropbox-API-Path-Root' header via&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.with_path_root" target="_self"&gt;Dropbox.with_path_root&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Nov 2020 15:51:00 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2020-11-03T15:51:00Z</dc:date>
    <item>
      <title>Download a file inside a Shared Team Folder using the Python SDK</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-file-inside-a-Shared-Team-Folder-using-the-Python-SDK/m-p/466700#M23802</link>
      <description>&lt;P&gt;I'm trying to download files inside a shared Dropbox Team Folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a list of shared folders in my account and I have the preview URLs saved for all the folders.&lt;/P&gt;
&lt;P&gt;Using the preview URLs, I am able to recursively get a list of all files within the directory as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;link = dropbox.files.SharedLink(url=shared)
entries = dbx.files_list_folder(path="", shared_link=link).entries&lt;/PRE&gt;
&lt;P&gt;This works great - it gives me the list of all the files and folders inside. I can recursively run the files_list_folder with the updated path including the entry name as well. However, the path_lower values for all entries are None.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, I need to be able to download the files to my local machine using the SDK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can use the following for files in my personal/user dropbox account:&lt;/P&gt;
&lt;PRE&gt;dbx.files_download_to_file(tmp, entry.id)&lt;/PRE&gt;
&lt;P&gt;But I'm not able to use that to download files in the shared directry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead of entry.id, I tried {path/to/file} and {parent folder id}/{path/to/file} but those doesn't work either.&lt;/P&gt;
&lt;P&gt;I also tried using sharing_get_shared_link_file but that returns:&lt;/P&gt;
&lt;PRE&gt;dropbox.exceptions.ApiError: ApiError('489644ba039f4389a501a619df93a11a', GetSharedLinkFileError('shared_link_not_found', None))&lt;/PRE&gt;
&lt;P&gt;Any help would be greatly appreciated!! Thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 12:13:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-file-inside-a-Shared-Team-Folder-using-the-Python-SDK/m-p/466700#M23802</guid>
      <dc:creator>naru95</dc:creator>
      <dc:date>2020-11-03T12:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Download a file inside a Shared Team Folder using the Python SDK</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-file-inside-a-Shared-Team-Folder-using-the-Python-SDK/m-p/466828#M23806</link>
      <description>&lt;P&gt;I can't say for sure exactly what's happening without seeing the actual values, but if the files are in the connected account, it's better to use paths/IDs everywhere, instead of preview/shared links. That's the more direct way of referencing things and may avoid the missing path values you mentioned, depending on the scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, note that if the files are in the "team space", you do need to set some additional configuration to be able to access them. (API calls operate in the "team member folder" by default, but you can access the "team space" when you need to.) I&amp;nbsp;recommend reading the Team Files Guide first:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/lp/developers/reference/dbx-team-files-guide" target="_self"&gt;https://www.dropbox.com/lp/developers/reference/dbx-team-files-guide&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the Python SDK in particular, you can set that 'Dropbox-API-Path-Root' header via&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.with_path_root" target="_self"&gt;Dropbox.with_path_root&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 15:51:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Download-a-file-inside-a-Shared-Team-Folder-using-the-Python-SDK/m-p/466828#M23806</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-11-03T15:51:00Z</dc:date>
    </item>
  </channel>
</rss>

