<?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: How to provide the Dropbox-API-Select-User HTTP header with python API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355985#M20328</link>
    <description>&lt;P&gt;By default, API calls will operate in the private team member folder. It sounds like you want to access the team space though. To do so, you need to set the "path root" for the API call to be the team space.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I recommend reading &lt;A href="https://www.dropbox.com/developers/reference/namespace-guide" target="_self"&gt;the Namespace Guide&lt;/A&gt;, which covers this in detail.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&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;/P&gt;
&lt;PRE&gt;dbx.with_path_root(dropbox.common.PathRoot.root("XXXXXXXXX")).files_list_folder("")&lt;/PRE&gt;
&lt;P&gt;or:&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>Thu, 18 Jul 2019 17:50:31 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2019-07-18T17:50:31Z</dc:date>
    <item>
      <title>How to provide the Dropbox-API-Select-User HTTP header with python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355925#M20323</link>
      <description>&lt;P&gt;Hi ! I've generated access token for&amp;nbsp;&lt;SPAN&gt;Business App, and tried to make simple request&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;dbx = dropbox.Dropbox(my_token)&lt;BR /&gt;dbx.files_list_folder(path).entries&lt;/PRE&gt;
&lt;P&gt;But I got&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dropbox.exceptions.BadInputError:&amp;nbsp; 'Error in call to API function "files/list_folder": This API function operates on a single Dropbox account, but the OAuth 2 access token you provided is for an entire Dropbox Business team.&amp;nbsp;Since your API app key has team member file access permissions, you can operate on a team member\'s Dropbox by providing the "Dropbox-API-Select-User" HTTP header or "select_user" URL parameter to specify the exact user&lt;/P&gt;
&lt;P&gt;And from given documentation there is a part saying:&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;Specify the&amp;nbsp;&lt;/SPAN&gt;member_id&lt;SPAN&gt;&amp;nbsp;of the user that the app wants to act on using a custom HTTP header called&amp;nbsp;&lt;/SPAN&gt;Dropbox-API-Select-User&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I just got stuck and need help for spicifying&amp;nbsp;Dropbox-API-Select-User via python or in other ways if there are so.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Additional info: I have &amp;nbsp;&lt;A href="https://www.dropbox.com/l/AABtIgMtjVHTfD3Q4skCuK2QHqyL9NGpBXg/help/9056" target="_blank" rel="noopener"&gt;team admin permissions&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Permission type for app is&amp;nbsp; Team member file access&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 13:11:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355925#M20323</guid>
      <dc:creator>VahagnGhaz</dc:creator>
      <dc:date>2019-07-18T13:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide the Dropbox-API-Select-User HTTP header with python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355945#M20325</link>
      <description>&lt;P&gt;In the Dropbox Python SDK, you can specify this header using&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.DropboxTeam.as_user" target="_self"&gt;DropboxTeam.as_user&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;You can get the team member IDs from a number of places, such as&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.DropboxTeam.team_members_get_info" target="_self"&gt;DropboxTeam.team_members_get_info&lt;/A&gt;, or&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.DropboxTeam.team_members_list" target="_self"&gt;DropboxTeam.team_members_list&lt;/A&gt;/&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.DropboxTeam.team_members_list_continue" target="_self"&gt;DropboxTeam.team_members_list_continue&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 14:38:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355945#M20325</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-07-18T14:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide the Dropbox-API-Select-User HTTP header with python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355959#M20327</link>
      <description>&lt;P&gt;Thanks for your reply. Everything works fine, but now I have another issue. All I need to list, write ...&amp;nbsp; in TEAM shared folder, but&amp;nbsp; when I use&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;self&lt;/SPAN&gt;.dbx.files_list_folder(&lt;SPAN&gt;self&lt;/SPAN&gt;.path).entries&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;I got&amp;nbsp;['Get Started with Dropbox Paper.url', 'Get Started with Dropbox.pdf'], which is my private folder content. So is there any way to access shared folder ?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 15:58:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355959#M20327</guid>
      <dc:creator>VahagnGhaz</dc:creator>
      <dc:date>2019-07-18T15:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide the Dropbox-API-Select-User HTTP header with python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355985#M20328</link>
      <description>&lt;P&gt;By default, API calls will operate in the private team member folder. It sounds like you want to access the team space though. To do so, you need to set the "path root" for the API call to be the team space.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I recommend reading &lt;A href="https://www.dropbox.com/developers/reference/namespace-guide" target="_self"&gt;the Namespace Guide&lt;/A&gt;, which covers this in detail.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&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;/P&gt;
&lt;PRE&gt;dbx.with_path_root(dropbox.common.PathRoot.root("XXXXXXXXX")).files_list_folder("")&lt;/PRE&gt;
&lt;P&gt;or:&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>Thu, 18 Jul 2019 17:50:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355985#M20328</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-07-18T17:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide the Dropbox-API-Select-User HTTP header with python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355991#M20329</link>
      <description>&lt;P&gt;I got :: &amp;gt; dropbox.exceptions.PathRootError: PathRootError('2f7ac7e2ce9abb921272552f987f63b3', PathRootError('no_permission', None)),&lt;/P&gt;&lt;P&gt;when try to run this command, so for permission do I need to make business app?&lt;/P&gt;&lt;PRE&gt;self.dbx.with_path_root(dropbox.common.PathRoot.namespace_id(&lt;SPAN&gt;"2"&lt;/SPAN&gt;)).files_list_folder(&lt;SPAN&gt;""&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 18:09:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355991#M20329</guid>
      <dc:creator>VahagnGhaz</dc:creator>
      <dc:date>2019-07-18T18:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide the Dropbox-API-Select-User HTTP header with python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355995#M20330</link>
      <description>&lt;P&gt;Actuall I have this structure, and all I need to do is work with shared ELEMENTS folder&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2019-07-18 22-14-38.png" style="width: 582px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/10276i0C4CBE8C3D6827A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot from 2019-07-18 22-14-38.png" alt="Screenshot from 2019-07-18 22-14-38.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 18:16:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/355995#M20330</guid>
      <dc:creator>VahagnGhaz</dc:creator>
      <dc:date>2019-07-18T18:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide the Dropbox-API-Select-User HTTP header with python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/356001#M20331</link>
      <description>&lt;P&gt;Okay! I got that ! thanks for your support.&amp;nbsp; Just in case someone has this issue too, here is my solution&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dbx = dropbox.Dropbox(my_token)&lt;BR /&gt;root_namespace_id = dbx.users_get_current_account().root_info.root_namespace_id&lt;BR /&gt;dbx = dbx.with_path_root(PathRoot.namespace_id(root_namespace_id))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 18:37:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-provide-the-Dropbox-API-Select-User-HTTP-header-with/m-p/356001#M20331</guid>
      <dc:creator>VahagnGhaz</dc:creator>
      <dc:date>2019-07-18T18:37:57Z</dc:date>
    </item>
  </channel>
</rss>

