<?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: Write File to Team location - Python API in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Write-File-to-Team-location-Python-API/m-p/331178#M500</link>
    <description>&lt;P&gt;&lt;SPAN&gt;It sounds like your team is using&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.dropbox.com/help/business/team-space-overview" rel="noreferrer" target="_blank"&gt;the "team space" configuration&lt;/A&gt;&lt;SPAN&gt;. You can access the team space via the API. To do so, you'll need to use the namespace IDs to specify which area you want to access. I recommend reading the Namespace Guide, which covers this in detail:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/reference/namespace-guide" rel="noreferrer" target="_blank"&gt;https://www.dropbox.com/developers/reference/namespace-guide&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the Python SDK in particular, to specify a particular root, you should use `&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.with_path_root" target="_self"&gt;with_path_root&lt;/A&gt;`. For example:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;dbx.with_path_root(dropbox.common.PathRoot.root("XXXXXXXXX")).files_list_folder("")&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;or:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;dbx.with_path_root(dropbox.common.PathRoot.namespace_id("XXXXXXXXX")).files_list_folder("")&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Feb 2019 16:47:31 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2019-02-27T16:47:31Z</dc:date>
    <item>
      <title>Write File to Team location - Python API</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Write-File-to-Team-location-Python-API/m-p/331045#M497</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a simple python script to write a file to Dropbox. The issue I'm having is this only seems to give me access to my user area and I need to write the file to the team area. I have read&amp;nbsp; documentation but am struggling to find any simple examples using the python API.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;PRE&gt;import dropbox

access_token = '*************************************'

file_from = 'test.txt'
file_to = '/test_dropbox/test.txt'

dbx = dropbox.Dropbox(access_token)

with open(file_from, 'rb') as f:
    dbx.files_upload(f.read(), file_to)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:05:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Write-File-to-Team-location-Python-API/m-p/331045#M497</guid>
      <dc:creator>mgjones1984</dc:creator>
      <dc:date>2019-05-29T09:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Write File to Team location - Python API</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Write-File-to-Team-location-Python-API/m-p/331178#M500</link>
      <description>&lt;P&gt;&lt;SPAN&gt;It sounds like your team is using&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.dropbox.com/help/business/team-space-overview" rel="noreferrer" target="_blank"&gt;the "team space" configuration&lt;/A&gt;&lt;SPAN&gt;. You can access the team space via the API. To do so, you'll need to use the namespace IDs to specify which area you want to access. I recommend reading the Namespace Guide, which covers this in detail:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/reference/namespace-guide" rel="noreferrer" target="_blank"&gt;https://www.dropbox.com/developers/reference/namespace-guide&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the Python SDK in particular, to specify a particular root, you should use `&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.with_path_root" target="_self"&gt;with_path_root&lt;/A&gt;`. For example:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;dbx.with_path_root(dropbox.common.PathRoot.root("XXXXXXXXX")).files_list_folder("")&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;or:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;dbx.with_path_root(dropbox.common.PathRoot.namespace_id("XXXXXXXXX")).files_list_folder("")&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 16:47:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Write-File-to-Team-location-Python-API/m-p/331178#M500</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-02-27T16:47:31Z</dc:date>
    </item>
  </channel>
</rss>

