<?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 Query Dropbox API with `select_user` URL parameter in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API-with-select-user-URL-parameter/m-p/497285#M24751</link>
    <description>&lt;P&gt;Hi there!&lt;/P&gt;
&lt;P&gt;So what I'm trying to do is query Dropbox using python's &lt;FONT face="courier new,courier"&gt;from dropbox import DropboxTeam&lt;/FONT&gt;'s &lt;FONT face="courier new,courier"&gt;request_json_object&lt;/FONT&gt;&amp;nbsp;API.&lt;BR /&gt;I want to query the API path: &lt;FONT face="courier new,courier"&gt;files/list_folder&lt;/FONT&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;My request dictionary that I pass to the function is as following:&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;&lt;BR /&gt;However, I am getting a &lt;FONT face="courier new,courier"&gt;BadInputError&lt;/FONT&gt; error:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;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 &amp;lt;&lt;A href="https://www.dropbox.com/developers/documentation/http/teams" target="_blank" rel="noopener"&gt;https://www.dropbox.com/developers/documentation/http/teams&lt;/A&gt;&amp;gt;.'&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;What am I doing wrong here?&lt;/P&gt;</description>
    <pubDate>Wed, 17 Feb 2021 20:13:01 GMT</pubDate>
    <dc:creator>bipalshakya</dc:creator>
    <dc:date>2021-02-17T20:13:01Z</dc:date>
    <item>
      <title>Query Dropbox API with `select_user` URL parameter</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API-with-select-user-URL-parameter/m-p/497285#M24751</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;
&lt;P&gt;So what I'm trying to do is query Dropbox using python's &lt;FONT face="courier new,courier"&gt;from dropbox import DropboxTeam&lt;/FONT&gt;'s &lt;FONT face="courier new,courier"&gt;request_json_object&lt;/FONT&gt;&amp;nbsp;API.&lt;BR /&gt;I want to query the API path: &lt;FONT face="courier new,courier"&gt;files/list_folder&lt;/FONT&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;My request dictionary that I pass to the function is as following:&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;&lt;BR /&gt;However, I am getting a &lt;FONT face="courier new,courier"&gt;BadInputError&lt;/FONT&gt; error:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;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 &amp;lt;&lt;A href="https://www.dropbox.com/developers/documentation/http/teams" target="_blank" rel="noopener"&gt;https://www.dropbox.com/developers/documentation/http/teams&lt;/A&gt;&amp;gt;.'&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;What am I doing wrong here?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 20:13:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API-with-select-user-URL-parameter/m-p/497285#M24751</guid>
      <dc:creator>bipalshakya</dc:creator>
      <dc:date>2021-02-17T20:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Query Dropbox API with `select_user` URL parameter</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API-with-select-user-URL-parameter/m-p/497288#M24752</link>
      <description>&lt;P&gt;[Cross-linking for reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/66247055/query-dropbox-api-with-select-user-url-parameter" target="_blank"&gt;https://stackoverflow.com/questions/66247055/query-dropbox-api-with-select-user-url-parameter&lt;/A&gt;&amp;nbsp;]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, note that you don't need to use `request_json_object` directly. You generally should use the native methods provided for each endpoint. In the official Dropbox Python SDK, for /2/files/list_folder, that would be `&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.files_list_folder" target="_self"&gt;files_list_folder&lt;/A&gt;`.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And to set the the"Dropbox-API-Select-User" HTTP header when using the official Dropbox Python SDK, you should do so via the `&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;` method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 17:47:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API-with-select-user-URL-parameter/m-p/497288#M24752</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-02-17T17:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Query Dropbox API with `select_user` URL parameter</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API-with-select-user-URL-parameter/m-p/497290#M24753</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;Thanks for the prompt response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason that I opted for &lt;FONT face="courier new,courier"&gt;request_json_object&lt;/FONT&gt; was that I would get JSON output, which is the format that I need the results in.&lt;/P&gt;&lt;P&gt;With the SDK however, I'd get a Dropbox object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way that I could get the response from SDK in JSON? Or a way I could transform the Dropbox object response to JSON or python dictionary?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 17:52:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API-with-select-user-URL-parameter/m-p/497290#M24753</guid>
      <dc:creator>bipalshakya</dc:creator>
      <dc:date>2021-02-17T17:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Query Dropbox API with `select_user` URL parameter</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API-with-select-user-URL-parameter/m-p/497299#M24754</link>
      <description>&lt;P&gt;The methods for calling the API in the Dropbox Python SDK like&amp;nbsp;files_list_folder don't offer the original JSON,&amp;nbsp;but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can transform the information in the returned native object, such as&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.ListFolderResult" target="_self"&gt;ListFolderResult&lt;/A&gt; for&amp;nbsp;files_list_folder, however you wish. You'd need to write the code to do so though, e.g., to build some JSON.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 18:15:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API-with-select-user-URL-parameter/m-p/497299#M24754</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-02-17T18:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query Dropbox API with `select_user` URL parameter</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API-with-select-user-URL-parameter/m-p/497307#M24756</link>
      <description>&lt;P&gt;Thanks, Greg for the clarification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will proceed accordingly. Hoping that the API is updated to return JSON serializable object soon!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 18:22:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Query-Dropbox-API-with-select-user-URL-parameter/m-p/497307#M24756</guid>
      <dc:creator>bipalshakya</dc:creator>
      <dc:date>2021-02-17T18:22:43Z</dc:date>
    </item>
  </channel>
</rss>

