<?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: Query Dropbox API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API/m-p/540953#M25947</link>
    <description>&lt;P data-unlink="true"&gt;First, note that you don't need to use the request_json_object method directly. You should use the provided native methods for the API endpoints, such as &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder" target="_self"&gt;files_list_folder&lt;/A&gt; for /2/files/list_folder.&lt;/P&gt;
&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;Anyway, this error message is referring to specifying what account on the Business team to operate on behalf of. When using any "team scopes", the resulting access token is connected to an entire Dropbox Business team, not an individual account. So, when using a team-scoped access token to access user-specific endpoints, such as &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_self" rel="noreferrer"&gt;/2/files/list_folder&lt;/A&gt; via &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder" target="_self"&gt;the&amp;nbsp;files_list_folder method&lt;/A&gt; in the Python SDK, you will need to specify which member of the team you want to operate on behalf of.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To do this, you'd need to &lt;A href="https://www.dropbox.com/developers/documentation/http/teams#teams-member-file-access" target="_blank" rel="noopener noreferrer"&gt;specify&lt;/A&gt; the 'Dropbox-API-Select-User' header. The value should be the&amp;nbsp;team_member_id for whichever member you wish to act on behalf of. In the Python SDK, that can be done using &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.DropboxTeam.as_user" target="_self"&gt;the DropboxTeam.as_user method&lt;/A&gt;.&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;BR /&gt;Alternatively, if you just want to connect to your particular account, you can disable any team scopes and get a new access token without them. The access token without the team scopes will be specific to the particular account (Business or not) and so will not require the additional header. You can find more information on scopes in &lt;A href="https://developers.dropbox.com/oauth-guide" target="_blank" rel="noopener noreferrer"&gt;the OAuth Guide&lt;/A&gt;. If you don't need to call any team endpoints (e.g., if you just need to call file endpoints, such as &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_self" rel="noreferrer"&gt;/2/files/list_folder&lt;/A&gt; via &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder" target="_self"&gt;the&amp;nbsp;files_list_folder method&lt;/A&gt;), you may prefer to use this solution instead for simplicity and security.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Aug 2021 16:03:05 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2021-08-24T16:03:05Z</dc:date>
    <item>
      <title>Query Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API/m-p/540883#M25941</link>
      <description>&lt;P&gt;Hello.&lt;BR /&gt;I am trying to&amp;nbsp;&lt;SPAN&gt;query Dropbox using python's&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;from dropbox import DropboxTeam&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;request_json_object&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;API.&lt;BR /&gt;I need to&amp;nbsp;&amp;nbsp;query the API path:&amp;nbsp;&lt;FONT face="courier new,courier"&gt;files/list_folder&lt;BR /&gt;&lt;FONT face="andale mono,times"&gt;My request look like &lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;request_json_object(dict(
    host='api',
    auth_type='team',
    route_style='rpc',
    request_binary=None,
    route_name='files/list_folder',
    request_arg={'limit': 1, 'select_user': 'userid:111...111'}
))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;But I am getting this error&amp;nbsp;BadInputError&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;'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. 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;BR /&gt;&lt;A href="http://nationalcinematheque.com.ua/" target="_self"&gt;https&lt;/A&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/teams" target="_self"&gt;://www.dropbox.com/developers/documentation/http/teams&amp;nbsp;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 10:46:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API/m-p/540883#M25941</guid>
      <dc:creator>JessicaPaul</dc:creator>
      <dc:date>2021-08-24T10:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Query Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API/m-p/540953#M25947</link>
      <description>&lt;P data-unlink="true"&gt;First, note that you don't need to use the request_json_object method directly. You should use the provided native methods for the API endpoints, such as &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder" target="_self"&gt;files_list_folder&lt;/A&gt; for /2/files/list_folder.&lt;/P&gt;
&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;Anyway, this error message is referring to specifying what account on the Business team to operate on behalf of. When using any "team scopes", the resulting access token is connected to an entire Dropbox Business team, not an individual account. So, when using a team-scoped access token to access user-specific endpoints, such as &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_self" rel="noreferrer"&gt;/2/files/list_folder&lt;/A&gt; via &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder" target="_self"&gt;the&amp;nbsp;files_list_folder method&lt;/A&gt; in the Python SDK, you will need to specify which member of the team you want to operate on behalf of.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To do this, you'd need to &lt;A href="https://www.dropbox.com/developers/documentation/http/teams#teams-member-file-access" target="_blank" rel="noopener noreferrer"&gt;specify&lt;/A&gt; the 'Dropbox-API-Select-User' header. The value should be the&amp;nbsp;team_member_id for whichever member you wish to act on behalf of. In the Python SDK, that can be done using &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.DropboxTeam.as_user" target="_self"&gt;the DropboxTeam.as_user method&lt;/A&gt;.&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;BR /&gt;Alternatively, if you just want to connect to your particular account, you can disable any team scopes and get a new access token without them. The access token without the team scopes will be specific to the particular account (Business or not) and so will not require the additional header. You can find more information on scopes in &lt;A href="https://developers.dropbox.com/oauth-guide" target="_blank" rel="noopener noreferrer"&gt;the OAuth Guide&lt;/A&gt;. If you don't need to call any team endpoints (e.g., if you just need to call file endpoints, such as &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_self" rel="noreferrer"&gt;/2/files/list_folder&lt;/A&gt; via &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder" target="_self"&gt;the&amp;nbsp;files_list_folder method&lt;/A&gt;), you may prefer to use this solution instead for simplicity and security.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 16:03:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API/m-p/540953#M25947</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-08-24T16:03:05Z</dc:date>
    </item>
  </channel>
</rss>

