<?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: Still getting error even when using Dropbox-API-Select-Admin header with as_admin method in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Still-getting-error-even-when-using-Dropbox-API-Select-Admin/m-p/611009#M2791</link>
    <description>&lt;P&gt;Correct, &amp;lt;team_member_id&amp;gt; was accidentally a None obj ...&lt;BR /&gt;Thank you...&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2022 06:36:05 GMT</pubDate>
    <dc:creator>Cato2021</dc:creator>
    <dc:date>2022-07-21T06:36:05Z</dc:date>
    <item>
      <title>Still getting error even when using Dropbox-API-Select-Admin header with as_admin method</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Still-getting-error-even-when-using-Dropbox-API-Select-Admin/m-p/610559#M2787</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;, last time you helped me, maybe also this time?&lt;BR /&gt;&lt;BR /&gt;I'm trying to traverse a team's files and folder while having a Dropbox Business team access token.&lt;BR /&gt;This is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;dbx_t = DropboxTeam(token)
dbx_t_as_admin = dbx_t.as_admin(&amp;lt;team_member_id str&amp;gt;)
namespaces_list_obj = dbx_t.team_namespaces_list()
    for namespace_meta in namespaces_list_obj.namespaces:
        ns = namespace_meta.namespace_id
        files_meta = dbx_t_as_admin.files_list_folder(path='ns:'+ns)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code fell on the last line.&lt;BR /&gt;Getting this error:&lt;BR /&gt;&lt;SPAN&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;BR /&gt;&lt;/SPAN&gt;I thought the &lt;EM&gt;as_admin&lt;/EM&gt; method suppose to handle the "Dropbox-API-Select-Admin" header...&lt;BR /&gt;What am I doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 21:19:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Still-getting-error-even-when-using-Dropbox-API-Select-Admin/m-p/610559#M2787</guid>
      <dc:creator>Cato2021</dc:creator>
      <dc:date>2022-07-25T21:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Still getting error even when using Dropbox-API-Select-Admin header with as_admin method</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Still-getting-error-even-when-using-Dropbox-API-Select-Admin/m-p/610560#M2788</link>
      <description>&lt;P&gt;BTW I also tried the &lt;EM&gt;as_user&lt;/EM&gt; method...&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 13:44:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Still-getting-error-even-when-using-Dropbox-API-Select-Admin/m-p/610560#M2788</guid>
      <dc:creator>Cato2021</dc:creator>
      <dc:date>2022-07-19T13:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Still getting error even when using Dropbox-API-Select-Admin header with as_admin method</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Still-getting-error-even-when-using-Dropbox-API-Select-Admin/m-p/610570#M2789</link>
      <description>&lt;P data-unlink="true"&gt;This error message is referring to specifying what account on the Business team to operate on behalf of. For reference, 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&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder" target="_blank"&gt;files_list_folder&lt;/A&gt;, you will need to specify which member of the team you want to operate on behalf of. (By the way, make sure you implement &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder_continue" target="_blank"&gt;files_list_folder_continue&lt;/A&gt; as well as &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder" target="_blank"&gt;files_list_folder&lt;/A&gt;, as described in the &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_list_folder" target="_blank"&gt;files_list_folder documentation&lt;/A&gt;, otherwise you may not get back all entries.)&lt;BR /&gt;&lt;BR /&gt;To do this, you'd need to specify &lt;A href="https://www.dropbox.com/developers/documentation/http/teams#teams-member-file-access" target="_blank"&gt;the 'Dropbox-API-Select-User' or 'Dropbox-API-Select-Admin' header&lt;/A&gt; as needed/desired. In the Python SDK, you should use the&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.DropboxTeam.as_user" target="_blank"&gt;DropboxTeam.as_user&lt;/A&gt; or&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.DropboxTeam.as_admin" target="_blank"&gt;DropboxTeam.as_admin&lt;/A&gt; method, respectively, to get a client with that set. The value should be the&amp;nbsp;team_member_id for whichever member you wish to act on behalf of. For example, you can find team member IDs by calling&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.DropboxTeam.team_members_get_info_v2" target="_blank"&gt;team_members_get_info_v2&lt;/A&gt; or &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.DropboxTeam.team_members_list_v2" target="_blank"&gt;team_members_list_v2&lt;/A&gt;/&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.DropboxTeam.team_members_list_continue_v2" target="_blank"&gt;team_members_list_continue_v2&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P data-unlink="true"&gt;I see you already showed using "as_admin" in your code, and also mentioned using "as_user" though. I tried the code you shared, plugging in my own access token and team member ID values, and it did work successfully for me. Can you double check that this is the exact code you're running when you see this error, and that you're successfully passing in a team_member_id value?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 14:05:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Still-getting-error-even-when-using-Dropbox-API-Select-Admin/m-p/610570#M2789</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-07-19T14:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Still getting error even when using Dropbox-API-Select-Admin header with as_admin method</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Still-getting-error-even-when-using-Dropbox-API-Select-Admin/m-p/611009#M2791</link>
      <description>&lt;P&gt;Correct, &amp;lt;team_member_id&amp;gt; was accidentally a None obj ...&lt;BR /&gt;Thank you...&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 06:36:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Still-getting-error-even-when-using-Dropbox-API-Select-Admin/m-p/611009#M2791</guid>
      <dc:creator>Cato2021</dc:creator>
      <dc:date>2022-07-21T06:36:05Z</dc:date>
    </item>
  </channel>
</rss>

