<?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# Get Access Token without browser interaction in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Get-Access-Token-without-browser-interaction/m-p/622510#M28758</link>
    <description>&lt;P&gt;It is not possible to fully automate this process. This needs to be done manually by the user at least once. If your app needs to maintain long-term access without the user manually re-authorizing it repeatedly, the app should request "offline" access so that it gets a refresh token. The refresh token doesn't expire and can be stored and used repeatedly to get new short-lived access tokens whenever needed, without the user manually reauthorizing the app.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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;, you can find an example of using the new authorization functionality, including 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).&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2022 14:57:06 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2022-09-14T14:57:06Z</dc:date>
    <item>
      <title>C# Get Access Token without browser interaction</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Get-Access-Token-without-browser-interaction/m-p/622443#M28752</link>
      <description>&lt;P&gt;I am working on .net console application to download dropbox documents&lt;/P&gt;
&lt;P&gt;i was able to do that with the generated access token from the application configuration but it gets&amp;nbsp; expires&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CCLFREPORTING_1-1663150211580.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/31638i7113EDB4F7F299E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CCLFREPORTING_1-1663150211580.png" alt="CCLFREPORTING_1-1663150211580.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i am following sample solution from github for OAuth&amp;nbsp;&lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/b5dff871d353c46dcdf61f0319a10be4ed0b8c0c/dropbox-sdk-dotnet/Examples/OauthBasic/Program.cs" target="_blank" rel="noopener"&gt;dropbox-sdk-dotnet/Program.cs at b5dff871d353c46dcdf61f0319a10be4ed0b8c0c · dropbox/dropbox-sdk-dotnet (github.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;after entering ClientID and Client Secret&amp;nbsp; and clicking the approve on browser i was able to get access token&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CCLFREPORTING_0-1663150173202.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/31637i4A2FF689FDB6D450/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CCLFREPORTING_0-1663150173202.png" alt="CCLFREPORTING_0-1663150173202.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there a way to get access token from C# without browser interaction&amp;nbsp; as i need to schedule the file download .net console application without user interaction&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 10:20:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Get-Access-Token-without-browser-interaction/m-p/622443#M28752</guid>
      <dc:creator>CCLFREPORTING</dc:creator>
      <dc:date>2022-09-14T10:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: C# Get Access Token without browser interaction</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Get-Access-Token-without-browser-interaction/m-p/622510#M28758</link>
      <description>&lt;P&gt;It is not possible to fully automate this process. This needs to be done manually by the user at least once. If your app needs to maintain long-term access without the user manually re-authorizing it repeatedly, the app should request "offline" access so that it gets a refresh token. The refresh token doesn't expire and can be stored and used repeatedly to get new short-lived access tokens whenever needed, without the user manually reauthorizing the app.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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;, you can find an example of using the new authorization functionality, including 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).&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 14:57:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/C-Get-Access-Token-without-browser-interaction/m-p/622510#M28758</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-09-14T14:57:06Z</dc:date>
    </item>
  </channel>
</rss>

