<?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: Support the old drobox and the new under same application in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Support-the-old-drobox-and-the-new-under-same-application/m-p/621512#M28725</link>
    <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/726161"&gt;@Omri1984&lt;/a&gt;&amp;nbsp;Здравко is correct; the SDK can handle the refresh process for you automatically, but you need to supply the refresh token, and app key, and if not using PKCE, the app secret. In your code, you're only supplying an access token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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" 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, 09 Sep 2022 12:47:26 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2022-09-09T12:47:26Z</dc:date>
    <item>
      <title>Support the old drobox and the new under same application</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Support-the-old-drobox-and-the-new-under-same-application/m-p/621453#M28718</link>
      <description>&lt;P&gt;Hi&amp;nbsp;guys,&lt;/P&gt;&lt;P&gt;my app is trying to support the old drobox and the new under then same client .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after getting the auth tokens we are creating a&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;new DropboxTeamClient(request.AccessToken);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then when we want to call the new client we use 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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;no you told me before that the refresh token for the .NET SDK is refreshing the toke automatically.&lt;/P&gt;&lt;P&gt;but after few hours i got an exception that my token is expired.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you help me understand what do I need to do?&lt;/P&gt;&lt;P&gt;i will say that while i am using specific client i am using in during all the process ?&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>Fri, 09 Sep 2022 05:21:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Support-the-old-drobox-and-the-new-under-same-application/m-p/621453#M28718</guid>
      <dc:creator>Omri1984</dc:creator>
      <dc:date>2022-09-09T05:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Support the old drobox and the new under same application</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Support-the-old-drobox-and-the-new-under-same-application/m-p/621478#M28719</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;Yes, when refresh token is in use (as a client constructor argument), the client automatically refresh access token whenever needed. In your code no any refresh token can be seen. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@9AD39CA637682E9616FBE31CDAF1B6C4/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt; (or I'm missing something) Just do what you are saying. &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; Follow the your own "answer".&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 08:14:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Support-the-old-drobox-and-the-new-under-same-application/m-p/621478#M28719</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-09-09T08:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Support the old drobox and the new under same application</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Support-the-old-drobox-and-the-new-under-same-application/m-p/621512#M28725</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/726161"&gt;@Omri1984&lt;/a&gt;&amp;nbsp;Здравко is correct; the SDK can handle the refresh process for you automatically, but you need to supply the refresh token, and app key, and if not using PKCE, the app secret. In your code, you're only supplying an access token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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" 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, 09 Sep 2022 12:47:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Support-the-old-drobox-and-the-new-under-same-application/m-p/621512#M28725</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-09-09T12:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Support the old drobox and the new under same application</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Support-the-old-drobox-and-the-new-under-same-application/m-p/621513#M28726</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Omri1984_0-1662727382357.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/31533i58B3C7AE626D048F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Omri1984_0-1662727382357.png" alt="Omri1984_0-1662727382357.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;i am using the NET SDK soafter open a different ticket i asked if i will need to refresh the token and the answer i got is above,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i need to call the method anyway just in case the token should be refreshed?&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;like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;new DropboxTeamClient(request.AccessToken);&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;/P&gt;&lt;P&gt;client.RefreshAccessToken(null);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or need to call the refresh token if an AUTH exception is thrown or do I need to do it before every request?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 12:47:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Support-the-old-drobox-and-the-new-under-same-application/m-p/621513#M28726</guid>
      <dc:creator>Omri1984</dc:creator>
      <dc:date>2022-09-09T12:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Support the old drobox and the new under same application</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Support-the-old-drobox-and-the-new-under-same-application/m-p/621515#M28728</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/726161"&gt;@Omri1984&lt;/a&gt; It looks like our comments just crossed. Please refer to my previous comment for information. If you configure that as described there, you do not need to call RefreshAccessToken yourself.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 12:49:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Support-the-old-drobox-and-the-new-under-same-application/m-p/621515#M28728</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-09-09T12:49:11Z</dc:date>
    </item>
  </channel>
</rss>

