<?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 Error in call to API function &amp;quot;&amp;quot;users/get_current_account&amp;quot;&amp;quot;: in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-quot-users-get-current/m-p/631109#M29147</link>
    <description>&lt;P&gt;after getting a token using this method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;client = new DropboxTeamClient(request.AccessToken, request.RefreshToken, request.Expires, ClientIdBusiness,&lt;BR /&gt;ClientSecretBusiness);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then i am trying to get the account using&amp;nbsp;&lt;/P&gt;&lt;P&gt;var account = await client.AsMember(request.AsMember).Users.GetCurrentAccountAsync();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but then i am getting the error below ?&lt;/P&gt;&lt;P&gt;i am using this method in order to check if the account is the new Dropbox Space Team or the old one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if (account.RootInfo.IsTeam)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;am I missing something ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;v=&lt;/P&gt;&lt;P&gt;: Error in call to API function ""users/get_current_account"": 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 use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am using the latest SDK Version&amp;nbsp;6.33.0.0&lt;/P&gt;</description>
    <pubDate>Sun, 23 Oct 2022 13:46:44 GMT</pubDate>
    <dc:creator>Omri1984</dc:creator>
    <dc:date>2022-10-23T13:46:44Z</dc:date>
    <item>
      <title>Error in call to API function ""users/get_current_account"":</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-quot-users-get-current/m-p/631109#M29147</link>
      <description>&lt;P&gt;after getting a token using this method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;client = new DropboxTeamClient(request.AccessToken, request.RefreshToken, request.Expires, ClientIdBusiness,&lt;BR /&gt;ClientSecretBusiness);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then i am trying to get the account using&amp;nbsp;&lt;/P&gt;&lt;P&gt;var account = await client.AsMember(request.AsMember).Users.GetCurrentAccountAsync();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but then i am getting the error below ?&lt;/P&gt;&lt;P&gt;i am using this method in order to check if the account is the new Dropbox Space Team or the old one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if (account.RootInfo.IsTeam)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;am I missing something ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;v=&lt;/P&gt;&lt;P&gt;: Error in call to API function ""users/get_current_account"": 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 use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am using the latest SDK Version&amp;nbsp;6.33.0.0&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2022 13:46:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-quot-users-get-current/m-p/631109#M29147</guid>
      <dc:creator>Omri1984</dc:creator>
      <dc:date>2022-10-23T13:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error in call to API function ""users/get_current_account"":</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-quot-users-get-current/m-p/631347#M29157</link>
      <description>&lt;P&gt;Using &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/gh-pages/obj/api/Dropbox.Api.DropboxTeamClient.html#Dropbox_Api_DropboxTeamClient_AsMember_System_String_" target="_blank"&gt;the AsMember method&lt;/A&gt; is the right way to set the "Dropbox-API-Select-User" header with the .NET SDK. Your code itself looks fine, but the issue may be with the value you're using. Make sure your "request.AsMember" variable is properly set to the team member ID of the team member you wish to call on behalf of. For instance, if you are actually passing an empty string there, you will get this error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(By the way, if you just want to connect to a particular account and don't need to call any team methods, you can disable any team scopes and get a new access token and refresh 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 "Dropbox-API-Select-User" header. You can find more information on scopes in &lt;A href="https://www.dropbox.com/lp/developers/reference/oauth-guide" rel="noopener noreferrer" target="_blank"&gt;the OAuth Guide&lt;/A&gt;. If you don't need to call any team methods, e.g., if you just need to call individual endpoints, such as GetCurrentAccountAsync, I recommend this solution instead for simplicity and security.)&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 16:12:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-in-call-to-API-function-quot-quot-users-get-current/m-p/631347#M29157</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-10-24T16:12:04Z</dc:date>
    </item>
  </channel>
</rss>

