<?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: slow response time when calling Dropbox.Api (6.37.0) with expired access token in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/slow-response-time-when-calling-Dropbox-Api-6-37-0-with-expired/m-p/683736#M30786</link>
    <description>&lt;P&gt;Running the same code with an invalid access token (empty string returns in less than 3 seconds on average):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sbrownnw_1-1683830741685.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/37721iF6AE4A86DB72A322/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sbrownnw_1-1683830741685.png" alt="sbrownnw_1-1683830741685.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 May 2023 18:45:47 GMT</pubDate>
    <dc:creator>sbrownnw</dc:creator>
    <dc:date>2023-05-11T18:45:47Z</dc:date>
    <item>
      <title>slow response time when calling Dropbox.Api (6.37.0) with expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/slow-response-time-when-calling-Dropbox-Api-6-37-0-with-expired/m-p/683733#M30785</link>
      <description>&lt;P&gt;Hello.&amp;nbsp; I am calling an established Dropbox account setup for an application with API access with what was once a valid access token that has expired.&amp;nbsp; It takes about 15 seconds or more to obtain the AuthException: expired_access_token result.&amp;nbsp; Why is this?&amp;nbsp; The response should be in milliseconds, not 15 seconds or more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code is listed below (.Net Core 6.0 console app) with debug session showing the stopwatch running for over 20 seconds before exception was encountered:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sbrownnw_0-1683830328239.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/37719iB277AD8B0BFA985C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sbrownnw_0-1683830328239.png" alt="sbrownnw_0-1683830328239.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 18:58:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/slow-response-time-when-calling-Dropbox-Api-6-37-0-with-expired/m-p/683733#M30785</guid>
      <dc:creator>sbrownnw</dc:creator>
      <dc:date>2023-05-11T18:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: slow response time when calling Dropbox.Api (6.37.0) with expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/slow-response-time-when-calling-Dropbox-Api-6-37-0-with-expired/m-p/683736#M30786</link>
      <description>&lt;P&gt;Running the same code with an invalid access token (empty string returns in less than 3 seconds on average):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sbrownnw_1-1683830741685.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/37721iF6AE4A86DB72A322/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sbrownnw_1-1683830741685.png" alt="sbrownnw_1-1683830741685.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 18:45:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/slow-response-time-when-calling-Dropbox-Api-6-37-0-with-expired/m-p/683736#M30786</guid>
      <dc:creator>sbrownnw</dc:creator>
      <dc:date>2023-05-11T18:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: slow response time when calling Dropbox.Api (6.37.0) with expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/slow-response-time-when-calling-Dropbox-Api-6-37-0-with-expired/m-p/683754#M30787</link>
      <description>&lt;P&gt;Thanks for the report. It looks like the .NET SDK is unnecessarily retrying (repeatedly, with a backoff) on 'expired_access_token' failures. I'll ask the team to update it to skip the automatic retries on that kind of failure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To work around this, you can make a &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/gh-pages/obj/api/Dropbox.Api.DropboxClientConfig.html#Dropbox_Api_DropboxClientConfig__ctor_System_String_System_Int32_" target="_blank"&gt;DropboxClientConfig&lt;/A&gt; with maxRetriesOnError set to 0, and pass that to &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/gh-pages/obj/api/Dropbox.Api.DropboxClient.html#Dropbox_Api_DropboxClient__ctor_System_String_Dropbox_Api_DropboxClientConfig_" target="_blank"&gt;DropboxClient&lt;/A&gt;. That would prevent the automatic retries and eliminate the extra latency in this case. It would also prevent the automatic retries in cases where they may be useful though, so if you want to lower that extra latency without completely disabling automatic retries, you can set it to a number between 0 and 4 (since 4 is the default).&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 20:13:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/slow-response-time-when-calling-Dropbox-Api-6-37-0-with-expired/m-p/683754#M30787</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-05-11T20:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: slow response time when calling Dropbox.Api (6.37.0) with expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/slow-response-time-when-calling-Dropbox-Api-6-37-0-with-expired/m-p/683755#M30788</link>
      <description>&lt;P&gt;Thanks for the quick reply.&amp;nbsp; Yes, your solution / workaround did make the response time better with using MaxRetriesOnError set to zero.&amp;nbsp; I am still seeing response times of 6 to 12 seconds with this change.&amp;nbsp; Seems like it should be 50% of the response times I am seeing when passing an expired token.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 20:19:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/slow-response-time-when-calling-Dropbox-Api-6-37-0-with-expired/m-p/683755#M30788</guid>
      <dc:creator>sbrownnw</dc:creator>
      <dc:date>2023-05-11T20:19:45Z</dc:date>
    </item>
  </channel>
</rss>

