<?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: Can I get current access token from DropboxClient (.NET SDK)? in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/533902#M2028</link>
    <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1459752"&gt;@kailasbhole&lt;/a&gt; No, I don't have an update on this request.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jul 2021 14:16:36 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2021-07-19T14:16:36Z</dc:date>
    <item>
      <title>Can I get current access token from DropboxClient (.NET SDK)?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/477148#M1626</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently in the process of migrating to the short-lived access token now, and I have one question regarding access token.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking at the documentation,&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxClient.htm" target="_self"&gt;Dropbox.Api.DropboxClient&lt;/A&gt; will automatically refresh the access token if necessary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My question:&lt;/STRONG&gt; Can I access to the current (whether it's refreshed or not) access token and it's expiration through&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxClient.htm" target="_self"&gt;Dropbox.Api.DropboxClient&lt;/A&gt; (or somewhere else)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get the latest access token whenever possible because our end-user can access Dropbox resources in quick succession from their Web browser, and when they do, we make requests to their Dropbox resources from our .NET server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without the current access token available to us, the &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxClient.htm" target="_self"&gt;Dropbox.Api.DropboxClient&lt;/A&gt;&amp;nbsp;will end up obtaining a new access token for almost every single request we make to Dropbox, which is not ideal for us (extra overhead, and we might get rate limitted too), and probably for Dropbox too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if it's possible for me to access the current access token (you don't have to tell me whether it's refreshed or not, since I can tell that by comparing with the old access token I have), and it's expiration from your .NET SDK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 03:22:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/477148#M1626</guid>
      <dc:creator>Koichia</dc:creator>
      <dc:date>2020-12-08T03:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get current access token from DropboxClient (.NET SDK)?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/477382#M1630</link>
      <description>&lt;P&gt;Thanks for writing this up and sharing the context. Unfortunately, no, I don't believe the&amp;nbsp;Dropbox .NET SDK offers a way to retrieve the current short-lived access token like this,&amp;nbsp;but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 16:41:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/477382#M1630</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-12-08T16:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get current access token from DropboxClient (.NET SDK)?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/477417#M1633</link>
      <description>&lt;P&gt;Thanks for your reply! &amp;nbsp;Yes I understand you cannot promiss if or when, but since there's still time left until the long-lived access token is retired, I'll patiently wait with a hope for this feature in the near future &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; &amp;nbsp;Otherwise we'll probably make a separate call to the token endpoint on our own and get new access token manually.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 19:02:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/477417#M1633</guid>
      <dc:creator>Koichia</dc:creator>
      <dc:date>2020-12-08T19:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get current access token from DropboxClient (.NET SDK)?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/533836#M2027</link>
      <description>&lt;P&gt;Is this functionality still not implemented&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 10:33:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/533836#M2027</guid>
      <dc:creator>kailasbhole</dc:creator>
      <dc:date>2021-07-19T10:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get current access token from DropboxClient (.NET SDK)?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/533902#M2028</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1459752"&gt;@kailasbhole&lt;/a&gt; No, I don't have an update on this request.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 14:16:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/533902#M2028</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-07-19T14:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get current access token from DropboxClient (.NET SDK)?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/590559#M2511</link>
      <description>&lt;P&gt;I would like to know how we can get the dropbox token using the .NET SDK?&amp;nbsp; Is it true that the Refresh Token does not Expire?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 20:40:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/590559#M2511</guid>
      <dc:creator>DrMDodd</dc:creator>
      <dc:date>2022-04-13T20:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get current access token from DropboxClient (.NET SDK)?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/590735#M2512</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/493792"&gt;@DrMDodd&lt;/a&gt;&amp;nbsp;For &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet" target="_blank" rel="noreferrer nofollow noopener"&gt;the official Dropbox API v2 .NET SDK&lt;/A&gt; in C#, you can find an example of getting and using a refresh token in &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/OauthBasic/Program.cs" target="_blank" rel="noreferrer nofollow noopener"&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" target="_blank" rel="noreferrer nofollow noopener"&gt;the OAuthPKCE example&lt;/A&gt; (PKCE, meant for client-side apps). As noted earlier in this thread, the SDK does not offer the ability to extract the current short-lived access token, but if you use the SDK as shown it will handle the access token for you. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And yes, Dropbox refresh tokens do not expire automatically (though they can be revoked on demand).&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 15:01:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/590735#M2512</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-04-14T15:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can I get current access token from DropboxClient (.NET SDK)?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/590782#M2514</link>
      <description>&lt;P&gt;As for retrieving the short-lived access token, what I do for now as a workaround is to use C# reflection (like&amp;nbsp;Type.GetField() and Type.GetProperties()).&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 17:26:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Can-I-get-current-access-token-from-DropboxClient-NET-SDK/m-p/590782#M2514</guid>
      <dc:creator>Koichia</dc:creator>
      <dc:date>2022-04-14T17:26:03Z</dc:date>
    </item>
  </channel>
</rss>

