<?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: Access token not beeing refreshed automatically in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624358#M28865</link>
    <description>&lt;P&gt;The token itself (both refresh and access) no (the above call is NOT affected). You have to take this in mind when actual API calls are performed (adding additional headers, whenever and if needed, on business account - as you are doing). That's it.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Sep 2022 13:31:58 GMT</pubDate>
    <dc:creator>Здравко</dc:creator>
    <dc:date>2022-09-22T13:31:58Z</dc:date>
    <item>
      <title>Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/622496#M28753</link>
      <description>&lt;P&gt;my application support old dropbox and the new one.&lt;/P&gt;&lt;P&gt;when creating the client i am creating it like this&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;client = new DropboxTeamClient(request.AccessToken, request.RefreshToken,request.Expires,ClientId,ClientSecret);&lt;/P&gt;&lt;P&gt;and then using it&amp;nbsp;&lt;/P&gt;&lt;P&gt;in this way&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;first Way&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;var members = await client.Team.MembersListAsync().ConfigureAwait(false);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this way&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Second Way&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;var account = await client.AsMember(request.AsMember).Users.GetCurrentAccountAsync();&lt;BR /&gt;var clientNew= client.AsMember(request.AsMember).WithPathRoot(new PathRoot.Root(account.RootInfo.RootNamespaceId));&lt;/P&gt;&lt;P&gt;var folders = await spaceclient.Files.ListFolderAsync(folderId);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my issue is after 4 hours when the token is expired&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i calling the&amp;nbsp; first way i am getting an error&amp;nbsp;&lt;/P&gt;&lt;P&gt;Response status code does not indicate success: 400 (Bad Request).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()&lt;BR /&gt;at Dropbox.Api.DropboxRequestHandler.&amp;lt;RefreshAccessToken&amp;gt;d__15.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;at Dropbox.Api.DropboxRequestHandler.&amp;lt;CheckAndRefreshAccessToken&amp;gt;d__21.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;at Dropbox.Api.DropboxRequestHandler.&amp;lt;RequestJsonStringWithRetry&amp;gt;d__18.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;at Dropbox.Api.DropboxRequestHandler.&amp;lt;Dropbox-Api-Stone-ITransport-SendRpcRequestAsync&amp;gt;d__12`3.MoveNext()&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()&lt;BR /&gt;at MaaS.Systems.Dropbox.Service.DropboxService.&amp;lt;GetUsersAsync&amp;gt;d__26.MoveNext() in C:\development\CloudSfer\Systems\MaaS.Systems.Dropbox\Service\DropboxService.cs:line 157&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()&lt;BR /&gt;at MaaS.Systems.Dropbox.DropboxServiceExtender.&amp;lt;GetHierarchy&amp;gt;d__7.MoveNext() in C:\development\CloudSfer\Systems\MaaS.Systems.Dropbox\DropboxServiceExtender.cs:line 126&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;BR /&gt;at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&lt;BR /&gt;at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;BR /&gt;at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()&lt;BR /&gt;at MaaS.Web.Controllers.Api.DropboxController.&amp;lt;TreeViewNodes&amp;gt;d__7.MoveNext() in C:\development\CloudSfer\MaaS.Web\Controllers\Api\DropboxController.cs:line 175&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it is look like it is failing on refreshing token .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem is that this request is not exist in the new client&amp;nbsp;&lt;/P&gt;&lt;P&gt;Team.MembersListAsync(). not exist in the new client&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please advice &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any Update Please&amp;nbsp;&lt;/P&gt;&lt;P&gt;maybe this method&amp;nbsp;client.Team.MembersListAsync() not handling as it should with the refresh token&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2022 06:08:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/622496#M28753</guid>
      <dc:creator>Omri1984</dc:creator>
      <dc:date>2022-09-18T06:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/623810#M28831</link>
      <description>&lt;P&gt;The first way looks correct, and that code is working for me when I supply valid credentials. Make sure you're supplying the correct and valid values. For example, make sure:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the refresh token is exactly as originally provided by Dropbox&lt;/LI&gt;
&lt;LI&gt;the refresh token hasn't been revoked by the app or user&lt;/LI&gt;
&lt;LI&gt;the client ID and secret, a.k.a., app key and secret, are exactly as originally provided by Dropbox&lt;/LI&gt;
&lt;LI&gt;the client ID and secret, a.k.a., app key and secret, are for the same app as the refresh token&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the second way, it is expected that "clientNew" would not have the &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/gh-pages/obj/api/Dropbox.Api.Team.Routes.TeamTeamRoutes.html#Dropbox_Api_Team_Routes_TeamTeamRoutes_MembersListAsync_Dropbox_Api_Team_MembersListArg_" target="_blank"&gt;MembersListAsync&lt;/A&gt; method, since the &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/gh-pages/obj/api/Dropbox.Api.Team.Routes.TeamTeamRoutes.html#Dropbox_Api_Team_Routes_TeamTeamRoutes_MembersListAsync_Dropbox_Api_Team_MembersListArg_" target="_blank"&gt;MembersListAsync&lt;/A&gt; method is only available on &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;DropboxTeamClient&lt;/A&gt; instances, not &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/gh-pages/obj/api/Dropbox.Api.DropboxClient.html" target="_blank"&gt;DropboxClient&lt;/A&gt; instances. The &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;AsMember&lt;/A&gt; method returns a &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/gh-pages/obj/api/Dropbox.Api.DropboxClient.html" target="_blank"&gt;DropboxClient&lt;/A&gt; instance to operate on a specific member, not the whole team. The &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/gh-pages/obj/api/Dropbox.Api.DropboxClient.html#Dropbox_Api_DropboxClient_WithPathRoot_Dropbox_Api_Common_PathRoot_" target="_blank"&gt;WithPathRoot&lt;/A&gt; method sets the root for the files calls made by the client. Neither of these control the refresh process.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 17:46:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/623810#M28831</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-09-20T17:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/623931#M28832</link>
      <description>&lt;P&gt;ok, but if i am calling the first way&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am getting the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to understand.&lt;/P&gt;&lt;P&gt;after 4 hours i am creating the dropbox team client with all the correct data(access,refresh,secret etc..).&lt;/P&gt;&lt;P&gt;but getting an error&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you try and reproduce it .&lt;/P&gt;&lt;P&gt;create a new token with 4 hours.&lt;/P&gt;&lt;P&gt;then wait 4 hours and then call the new dropbox team client with the token then you get before and call the client.Team.MembersListAsync()&lt;/P&gt;&lt;P&gt;i even try to call the refresh token method manually&amp;nbsp; but this didn't work also&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;need your help &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 05:37:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/623931#M28832</guid>
      <dc:creator>Omri1984</dc:creator>
      <dc:date>2022-09-21T05:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624004#M28838</link>
      <description>&lt;P&gt;Yes, I tried the code you shared, plugging in valid refresh token, etc. values, and it worked for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please review the list in my previous message for reasons why that would fail for you. Check and update your values as necessary to make sure you're providing correct and valid refresh token, etc. credentials.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 13:10:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624004#M28838</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-09-21T13:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624255#M28857</link>
      <description>&lt;P&gt;i an not understand and will need more assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my up i am always using the&amp;nbsp;DropboxTeamClient creating it with all the necessary parameters&lt;/P&gt;&lt;P&gt;like this.&lt;/P&gt;&lt;P&gt;var&amp;nbsp;client = new DropboxTeamClient(request.AccessToken, request.RefreshToken, request.Expires, ClientId, ClientSecret);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now after that i am checking if the client is in the new space or the old one&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;var account = await client.AsMember(request.AsMember).Users.GetCurrentAccountAsync();&lt;BR /&gt;var spaceclient = client.AsMember(request.AsMember).WithPathRoot(new PathRoot.Root(account.RootInfo.RootNamespaceId));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if (account.RootInfo.IsTeam)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;metadata = await spaceclient.Files.ListFolderAsync(folderId);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;metadata = await client.AsMember(request.AsMember).Files.ListFolderAsync(folderId)&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now sometimes i need to call this&amp;nbsp;&lt;/P&gt;&lt;P&gt;client.Team.MembersListAsync().ConfigureAwait(false);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and befoe every call i&amp;nbsp; am calling the&amp;nbsp;&lt;/P&gt;&lt;P&gt;var&amp;nbsp;client = new DropboxTeamClient(request.AccessToken, request.RefreshToken, request.Expires, ClientId, ClientSecret);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I need it because that sometimes i am handing for the same client al the data content and all the user and groups as well&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and my issue is that after the token is expire i am getting the error that was in the first message .&lt;/P&gt;&lt;P&gt;400 error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am really need to get to the bottom&amp;nbsp; of this and understand is completely&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 07:44:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624255#M28857</guid>
      <dc:creator>Omri1984</dc:creator>
      <dc:date>2022-09-22T07:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624259#M28859</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/726161"&gt;@Omri1984&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Can you just print (or display somehow) content of "request.RefreshToken"? Is there something that looks like valid refresh token or not exactly? 🧐&lt;/P&gt;&lt;P&gt;Hope this gives direction.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 08:09:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624259#M28859</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-09-22T08:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624278#M28861</link>
      <description>&lt;P&gt;something like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;ZEaFs***lgUAAAAAAAAAARUCp-9WwOK************************PIUr3P72**********Eg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;does it make sense ?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 09:42:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624278#M28861</guid>
      <dc:creator>Omri1984</dc:creator>
      <dc:date>2022-09-22T09:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624306#M28863</link>
      <description>&lt;P&gt;Hi again &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/726161"&gt;@Omri1984&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;To be honest I expected your token empty, but it seems Ok, at least. Let's see is it really Ok or not actually. Execute following command in terminal:&lt;/P&gt;&lt;PRE&gt;curl https://api.dropbox.com/oauth2/token -d grant_type=refresh_token -d refresh_token=ZEaFs***lgUAAAAAAAAAARUCp-9WwOK************************PIUr3P72**********Eg -u 12&lt;U&gt;APP_KEY&lt;/U&gt;3&lt;U&gt;HERE&lt;/U&gt;45:abc&lt;U&gt;APP_SECRET&lt;/U&gt;d&lt;U&gt;HERE&lt;/U&gt;efg&lt;/PRE&gt;&lt;P&gt;Place actual values on their corresponding places. You can use other standalone HTTP client, able to perform such a request, if curl is missing or inconvenient for your. Does the command completes successfully or gives back error (if error, what kind of error - post the result)?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 11:46:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624306#M28863</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-09-22T11:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624357#M28864</link>
      <description>&lt;P&gt;will test it,&amp;nbsp;&lt;/P&gt;&lt;P&gt;if i am asing a token with the business app or with the user app does the token is different between ?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 13:24:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624357#M28864</guid>
      <dc:creator>Omri1984</dc:creator>
      <dc:date>2022-09-22T13:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624358#M28865</link>
      <description>&lt;P&gt;The token itself (both refresh and access) no (the above call is NOT affected). You have to take this in mind when actual API calls are performed (adding additional headers, whenever and if needed, on business account - as you are doing). That's it.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 13:31:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624358#M28865</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-09-22T13:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624367#M28867</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/726161"&gt;@Omri1984&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;and befoe every call i&amp;nbsp; am calling the&amp;nbsp;&lt;/P&gt;&lt;P&gt;var&amp;nbsp;client = new DropboxTeamClient(request.AccessToken, request.RefreshToken, request.Expires, ClientId, ClientSecret);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I need it because that sometimes i am handing for the same client al the data content and all the user and groups as well&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You don't need to do the above "before every call". Changing client representation is enough. Otherwise, you are slowing down your speed up to 2 times (on every regular API call one more refresh call). It's meaningless.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 14:15:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624367#M28867</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-09-22T14:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624387#M28875</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/726161"&gt;@Omri1984&lt;/a&gt; It sounds like there's an issue with the credentials you're supplying, so trying the call outside of the SDK as Здравко suggested should be a useful test.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 15:09:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624387#M28875</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-09-22T15:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624866#M28909</link>
      <description>&lt;P&gt;I added some logs to check my cred during the running .&lt;/P&gt;&lt;P&gt;I will update here, it holiday now so in a few days ,&lt;/P&gt;&lt;P&gt;thanks for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;by the way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if create a&amp;nbsp;new DropboxTeamClient(request.AccessToken, request.RefreshToken,request.Expires,ClientId,ClientSecret);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can I call those methods&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var account = await client.AsMember(request.AsMember).Users.GetCurrentAccountAsync();&lt;BR /&gt;var spaceclient = client.AsMember(request.AsMember).WithPathRoot(new PathRoot.Root(account.RootInfo.RootNamespaceId));&lt;BR /&gt;&lt;BR /&gt;if (account.RootInfo.IsTeam)&lt;BR /&gt;{&lt;BR /&gt;await spaceclient.Files.ListFolderAsync(folderId)&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;await client.Team.MembersListAsync()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;await client.AsMember(request.AsMember).Files.ListFolderAsync(folderId)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and another question ,When using the .Net SDK when is the refresh token is happening?&lt;/P&gt;&lt;P&gt;does it happen for every method ?&lt;/P&gt;&lt;P&gt;does it happen when creating the client (new DropboxTeamClient(request.AccessToken, request.RefreshToken,request.Expires,ClientId,ClientSecret);)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Sep 2022 07:16:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624866#M28909</guid>
      <dc:creator>Omri1984</dc:creator>
      <dc:date>2022-09-25T07:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Access token not beeing refreshed automatically</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624882#M28912</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/726161"&gt;@Omri1984&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;by the way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if create a&amp;nbsp;new DropboxTeamClient(request.AccessToken, request.RefreshToken,request.Expires,ClientId,ClientSecret);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can I call those methods&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var account = await client.AsMember(request.AsMember).Users.GetCurrentAccountAsync();&lt;BR /&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/726161"&gt;@Omri1984&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Overall idea is correct (only representation change &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;); you may need to check your syntax, etc in your end variant. Additional optimization can be done as "cache" your 'representation' , if in particular limited place multiple calls need to be performed sequentially (less objects construct/destruct -&amp;gt; will left one representation construct at beginning and one destruct at the end).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/726161"&gt;@Omri1984&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;and another question ,When using the .Net SDK when is the refresh token is happening?&lt;/P&gt;&lt;P&gt;does it happen for every method ?&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes and No. On every method call, SDK (all of them - not only .Net) check if current access token exists and its validity. That's what's done mandatory. If there is not available access token or it's going to expire (or already expired), refresh gets performed (which means once on every 4 hours roughly, if you use your code continuously).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/726161"&gt;@Omri1984&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;does it happen when creating the client (new DropboxTeamClient(request.AccessToken, request.RefreshToken,request.Expires,ClientId,ClientSecret);)&lt;/P&gt;&lt;P&gt;&amp;nbsp;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;No, it doesn't happen on client object creation time, but on methods execution (as I mentioned above). &lt;U&gt;Warning:&lt;/U&gt; on client object creation, the state is reset, which means almost mandatory first call will need to refresh the token! As mentioned something meaningless. That's why it's not good idea to create client object continuously for every call, cosa the call gonna be forced to refresh (not the object construction itself). ".Net" SDK implementation doesn't provide currently some way to keep current state (like Java SDK or Python SDK). That's why the last state can't be restored (without some hacks/patches). Seems like a design bug. Let's hope this bug will be fixed.&lt;/P&gt;&lt;P&gt;Hope it's a bit more clear now.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Sep 2022 13:07:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-token-not-beeing-refreshed-automatically/m-p/624882#M28912</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-09-25T13:07:58Z</dc:date>
    </item>
  </channel>
</rss>

