<?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: C# Dropbox.API File Upload Errors in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595604#M27678</link>
    <description>&lt;P&gt;Thanks for all of the info! Very insightful. Now since I am using the Dropbox.API NuGet package, could you point me to any examples of tokenization using the "new" mechanism that's being rolled out?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 May 2022 15:06:59 GMT</pubDate>
    <dc:creator>gregarican</dc:creator>
    <dc:date>2022-05-06T15:06:59Z</dc:date>
    <item>
      <title>C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595582#M27675</link>
      <description>&lt;P&gt;I'm using the most recent NuGet package for my VS 2019 project. My app has worked consistently for several years now. But recently I have logged errors when invoking the client.Files.UploadAsync() method. The underlying exception appears as&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;The request was aborted: Could not create SSL/TLS secure channel&lt;/STRONG&gt;&lt;/EM&gt;. I have debugged my code and can see an access token is being provided so the API call is correctly authenticated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These errors are spotty, and don't happen consistently. At first I thought there was an issue with my WebView2 control I use in order to ensure that OAuth2 is properly functioning. But that has been eliminated, as I can verify that the access token is there. Now doing some additional troubleshooting and code changes I am getting back an error stating the access token has expired.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did something recently change in terms of the API endpoint and its behavior?&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 00:05:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595582#M27675</guid>
      <dc:creator>gregarican</dc:creator>
      <dc:date>2022-05-07T00:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595597#M27676</link>
      <description>&lt;P&gt;I think I might have stumbled upon what's going on. First off, I needed to ensure I am enforcing TLS 1.2 throughout my project. Previously it was just defined within the initial OAuth2 form's method. Secondly, I have read on the community posts that the access tokens now have shorter expiration times compared to previously. Strange that just now in 2022 I'm running into that mechanism. Most of the community posts were from a year or more ago where developers ran into this happening.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Between both elements I hope to have things patched up for my project. Time and testing will certainly tell.&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@488936AC5FA64023548E32631AFD9803/emoticons/1f600.png" alt=":grinning_face:" title=":grinning_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 14:42:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595597#M27676</guid>
      <dc:creator>gregarican</dc:creator>
      <dc:date>2022-05-06T14:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595600#M27677</link>
      <description>&lt;P&gt;Yes, that "Could not create SSL/TLS secure channel" error indicates this is due to a problem establishing the secure connection between your client and the Dropbox API servers. Specifically, &lt;SPAN class=" author-d-42z69zz85zx9z84zz79zvz66zz71z4yz65zz67znhz79zc7fz89zz67z5z82zikmz70zz75ztz72zz83zuyz68zz122zz69z9z122zz122zv35e"&gt;Dropbox recently retired support for TLS 1.0 and 1.1. The Dropbox API servers now only support connections using TLS 1.2. You'll need to update your app/network client/environment to use TLS 1.2 in order to continue making Dropbox API calls.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;SPAN class=" author-d-42z69zz85zx9z84zz79zvz66zz71z4yz65zz67znhz79zc7fz89zz67z5z82zikmz70zz75ztz72zz83zuyz68zz122zz69z9z122zz122zv35e"&gt;For your client/environment, please refer to the relevant documentation for information on enabling the relevant platform support. For example, Microsoft in particular appears to have some resources here which may be helpful:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=" author-d-42z69zz85zx9z84zz79zvz66zz71z4yz65zz67znhz79zc7fz89zz67z5z82zikmz70zz75ztz72zz83zuyz68zz122zz69z9z122zz122zv35e"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;UL class="listtype-bullet listindent1 list-bullet1"&gt;
&lt;LI&gt;&lt;SPAN class="attrlink url author-d-42z69zz85zx9z84zz79zvz66zz71z4yz65zz67znhz79zc7fz89zz67z5z82zikmz70zz75ztz72zz83zuyz68zz122zz69z9z122zz122zv35e url"&gt;&lt;A class="attrlink" href="https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls" target="_blank" rel="noreferrer nofollow noopener" data-target-href="https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls"&gt;https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN class="attrlink url author-d-42z69zz85zx9z84zz79zvz66zz71z4yz65zz67znhz79zc7fz89zz67z5z82zikmz70zz75ztz72zz83zuyz68zz122zz69z9z122zz122zv35e url"&gt;&lt;A class="attrlink" href="https://docs.microsoft.com/en-us/mem/configmgr/core/plan-design/security/enable-tls-1-2-client" target="_blank" rel="noreferrer nofollow noopener" data-target-href="https://docs.microsoft.com/en-us/mem/configmgr/core/plan-design/security/enable-tls-1-2-client"&gt;https://docs.microsoft.com/en-us/mem/configmgr/core/plan-design/security/enable-tls-1-2-client&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, technically unrelated to the TLS issue, Dropbox is in the process of switching to only issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. You can find &lt;A href="https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens" target="_blank" rel="noopener noreferrer"&gt;more information on this migration here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. You can find more information in the &lt;A href="https://developers.dropbox.com/oauth-guide" target="_blank" rel="noopener noreferrer"&gt;OAuth Guide&lt;/A&gt; and &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_blank" rel="noopener noreferrer"&gt;authorization documentation&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;For reference, while the creation of new long-lived access tokens is now deprecated, we don't currently have a plan to disable existing long-lived access tokens. (If that changes, we will of course announce that ahead of time.) That being the case, you can continue using existing long-lived access token(s) without interruption, if you have any. Also, note though that after the change you won't be able to create new long-lived access tokens.&lt;BR /&gt;&lt;BR /&gt;While the change began on September 30th 2021, we're releasing it gradually, so you may not have seen your app(s) affected until now. Once it applies to your app, it would apply regardless of the "Access token expiration" setting for your app, and that setting may no longer be available for your app.&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 14:53:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595600#M27677</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-05-06T14:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595604#M27678</link>
      <description>&lt;P&gt;Thanks for all of the info! Very insightful. Now since I am using the Dropbox.API NuGet package, could you point me to any examples of tokenization using the "new" mechanism that's being rolled out?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 15:06:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595604#M27678</guid>
      <dc:creator>gregarican</dc:creator>
      <dc:date>2022-05-06T15:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595605#M27679</link>
      <description>&lt;P&gt;Yes, for &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet" rel="noreferrer" target="_blank"&gt;the official Dropbox API v2 .NET SDK&lt;/A&gt;, you can find an example of using the new authorization functionality in &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/OauthBasic/Program.cs" rel="noreferrer" target="_blank"&gt;the OauthBasic example&lt;/A&gt; (non-PKCE, meant for server-side apps) as well as in &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/OAuthPKCE/Program.cs" rel="noreferrer" target="_blank"&gt;the OAuthPKCE example&lt;/A&gt; (PKCE, meant for client-side apps).&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 15:12:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595605#M27679</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-05-06T15:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595611#M27680</link>
      <description>&lt;P&gt;I downloaded the SDK and compiled the OAuthPKCE project. Apparently invoking the HttpListener.Start() method requires elevated privileges. Getting an Error Code: 5 - Access Denied. I'll try to ferret out the logic behind the sample code and implement it outside of the mechanism used in the sample project. Since my client-side app is a basic Click Once deployment that runs at the user level. And our endusers definitely don't have local admin rights to their PC's.&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@488936AC5FA64023548E32631AFD9803/emoticons/1f600.png" alt=":grinning_face:" title=":grinning_face:" /&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, reviewing the sample projects, it appears as if when a token has expired the routine to acquire a new one is invoking a web browser window in order to complete the OAuth process? So every 4 hours an enduser would be guided through that process, correct? The app I have is used for uploading scanned documents from dedicated endusers. These endusers have the app up all of the workday and are scanning multiple documents. So worst-case a few times a day they would have to run through the OAuth process again? I realize if I just work with the raw API I could likely use static App Authentication (&lt;A href="https://www.dropbox.com/developers/reference/auth-types" target="_blank"&gt;https://www.dropbox.com/developers/reference/auth-types&lt;/A&gt;) and forego the entire OAuth process if push came to shove...&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 16:47:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595611#M27680</guid>
      <dc:creator>gregarican</dc:creator>
      <dc:date>2022-05-06T16:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595616#M27681</link>
      <description>&lt;P&gt;No, when requesting "offline" access, the app receives a "refresh token" that can be used to retrieve new short-lived access tokens whenever, without manual user interaction (that is, the user doesn't need to repeatedly re-authorize the app once the app has the refresh token). The .NET SDK will perform that refresh process (getting new short-lived access tokens) automatically for you.&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 16:51:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595616#M27681</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-05-06T16:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595665#M27683</link>
      <description>&lt;P&gt;Okay, I'm making headway recoding my project to account for the new mechanism. I'm hitting a stumbling block trying to perform the second half of the initial OAuth2 process. Taking the code that's supplied in the URI and getting the refresh token. Below is a code snippet. I'm using a WebView2 form to run through the process, since it can run as user-level and doesn't require local admin rights.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The choke point is when my routine hits the&amp;nbsp;ProcessCodeFlowAsync() step. It consistently comes back with an invalid_grant exception. I've run across other posts on here where there were multiple calls going on, and the duplication was leading to this. But I'm only initially hitting this step once, when I first launch my app.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions on where to go from here? I do appreciate all of your timely assistance. It's been very helpful!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;private async void Start(string appKey, string appPwd)&lt;BR /&gt;{&lt;BR /&gt;this.ApiKey = appKey;&lt;BR /&gt;this.ApiPwd = appPwd;&lt;BR /&gt;this.oauth2State = Guid.NewGuid().ToString("N");&lt;BR /&gt;var authorizeUri = DropboxOAuth2Helper.GetAuthorizeUri(OAuthResponseType.Code, appKey, new Uri(RedirectUri), state: oauth2State, tokenAccessType: TokenAccessType.Offline);&lt;BR /&gt;await this.Browser.EnsureCoreWebView2Async(null);&lt;BR /&gt;this.Browser.CoreWebView2.Navigate(authorizeUri.ToString());&lt;BR /&gt;this.Visibility = Visibility.Visible;&lt;BR /&gt;this.Focus();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;private void BrowserNavigating(object sender, CoreWebView2NavigationStartingEventArgs e)&lt;BR /&gt;{&lt;BR /&gt;if (!e.Uri.ToString().StartsWith(RedirectUri, StringComparison.OrdinalIgnoreCase))&lt;BR /&gt;{&lt;BR /&gt;// we need to ignore all navigation that isn't to the redirect uri.&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;var uri = new Uri(e.Uri, UriKind.Absolute);&lt;BR /&gt;var queryParm = uri.Query;&lt;BR /&gt;var code = queryParm.Split('=')[1];&lt;BR /&gt;var tokenResult = Task.Run(() =&amp;gt; DropboxOAuth2Helper.ProcessCodeFlowAsync(responseUri: uri, appKey: this.ApiKey, appSecret: this.ApiPwd, state: this.oauth2State)).Result;&lt;BR /&gt;this.AccessToken = tokenResult.AccessToken;&lt;BR /&gt;this.RefreshToken = tokenResult.RefreshToken;&lt;BR /&gt;this.UserId = tokenResult.Uid;&lt;BR /&gt;this.Result = true;&lt;BR /&gt;}&lt;BR /&gt;catch (ArgumentException)&lt;BR /&gt;{&lt;BR /&gt;// There was an error in the code being processed.&lt;BR /&gt;}&lt;BR /&gt;finally&lt;BR /&gt;{&lt;BR /&gt;e.Cancel = true;&lt;BR /&gt;this.Close();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 19:50:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595665#M27683</guid>
      <dc:creator>gregarican</dc:creator>
      <dc:date>2022-05-06T19:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595678#M27684</link>
      <description>&lt;P&gt;An 'invalid_grant' error can indicate that the values you're supplying to ProcessCodeFlowAsync don't match the configuration used with GetAuthorizeUri to get that particular authorization. For instance, I see you're using a redirect URI ('new Uri(RedirectUri)') with GetAuthorizeUri. In that case, you need to supply that same redirect URI to ProcessCodeFlowAsync to validate that request.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is, in addition to setting the 'responseUri' parameter on &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_DropboxOAuth2Helper_ProcessCodeFlowAsync_1.htm" target="_blank"&gt;ProcessCodeFlowAsync&lt;/A&gt;, you should set 'redirectUri' as well (matching the 'redirectUri' value you gave to GetAuthorizeUri).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, I should mention that we don't officially support processing the OAuth app authorization flow in a web view. The OAuth app authorization flow should be processed in the user's system browser. See &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_blank"&gt;here for more information&lt;/A&gt;. It sounds like we don't have a full sample app that meets your use case exactly, but I have &lt;A href="https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/UWP-Webview-and-Token-Authorization/td-p/505807/highlight/true" target="_self"&gt;a post here&lt;/A&gt; with some information that may be helpful.&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 20:36:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595678#M27684</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-05-06T20:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595680#M27685</link>
      <description>&lt;P&gt;That did the trick! I just modified the one line for that second step so it's now below (added the argument in bold italics):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var tokenResult = Task.Run(() =&amp;gt; DropboxOAuth2Helper.ProcessCodeFlowAsync(responseUri: uri, appKey: this.ApiKey, appSecret: this.ApiPwd, state: this.oauth2State, &lt;EM&gt;&lt;STRONG&gt;redirectUri: RedirectUri&lt;/STRONG&gt;&lt;/EM&gt;)).Result;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now previously I was only connecting to the API by checking tokens when first launching my app. You're saying my client will automatically pull new access tokens once the old ones expire? So the refresh token remains static and the access token is automatically refreshed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code where I instantiate the client when the app first launches.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DropboxCertHelper.InitializeCertPinning();&lt;/P&gt;&lt;P&gt;DropboxClient client;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var httpClient = new HttpClient(new WebRequestHandler { ReadWriteTimeout = 10 * 1000 })&lt;BR /&gt;{&lt;BR /&gt;Timeout = TimeSpan.FromMinutes(20)&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var config = new DropboxClientConfig("DcDocScanner")&lt;BR /&gt;{&lt;BR /&gt;HttpClient = httpClient&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;config.HttpClient.Timeout = new TimeSpan(0, 5, 0);&lt;/P&gt;&lt;P&gt;client = new DropboxClient(Properties.Settings.Default.AccessToken, Properties.Settings.Default.RefreshToken, Properties.Settings.Default.DropboxApiKey, Properties.Settings.Default.DropboxApiPwd, config);&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 20:56:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595680#M27685</guid>
      <dc:creator>gregarican</dc:creator>
      <dc:date>2022-05-06T20:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595684#M27686</link>
      <description>&lt;P&gt;Great, I'm glad to hear that fixed it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And yes, the refresh token doesn't change or expire, and can be re-used multiple times. When you pass it to the DropboxClient like this, the client will automatically perform the refresh to get a new short-lived access token whenever needed, without you needing to do anything extra. (Note that just like with long-lived access tokens though, refresh tokens can be revoked on demand by the app or user.)&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 21:17:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595684#M27686</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-05-06T21:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: C# Dropbox.API File Upload Errors</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595868#M27694</link>
      <description>&lt;P&gt;Quick follow-up to this long thread&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@1CADB087A3A73888E9AEB0DBCCEA98E8/emoticons/1f605.png" alt=":grinning_face_with_sweat:" title=":grinning_face_with_sweat:" /&gt; I was still running into the expired access token exception, but this was because of the method overload I was using for instantiating the DropboxClient. I was using this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;client = new DropboxClient(Properties.Settings.Default.AccessToken, Properties.Settings.Default.RefreshToken, Properties.Settings.Default.DropboxApiKey, Properties.Settings.Default.DropboxApiPwd, config);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apparently referencing the access token value (even an old/expired one) was throwing a monkey wrench into the works. So I changed this to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;client = new DropboxClient(Properties.Settings.Default.RefreshToken, Properties.Settings.Default.DropboxApiKey, Properties.Settings.Default.DropboxApiPwd, config);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;await client.RefreshAccessToken(null);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Leaving out the access token argument and forcing an access token refresh appears to have cleaned things up. There are a lot of method overloads for creating a new DropboxClient instance, and I got lost in the sauce. But all fine now.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks again for all of the timely, helpful feedback. Honestly most API service providers aren't anywhere as responsive and supportive as I've experience on here!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 11:14:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Dropbox-API-File-Upload-Errors/m-p/595868#M27694</guid>
      <dc:creator>gregarican</dc:creator>
      <dc:date>2022-05-09T11:14:32Z</dc:date>
    </item>
  </channel>
</rss>

