<?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: How to programmatically get the Authorization code without requiring the user approval in OAuth in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/627124#M29006</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790" target="_self"&gt;&lt;SPAN class=""&gt;Здравко&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I tried to do this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__0-1664909640346.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32176iEC483B53D05C20EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__0-1664909640346.png" alt="Ivan__0-1664909640346.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I faced with such problem :&lt;/P&gt;&lt;P&gt;Firstly I am sending the request in order to get Approve code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__1-1664909755923.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32177i402000B931AD1750/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__1-1664909755923.png" alt="Ivan__1-1664909755923.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After I performed confirmation in browser that I am trusting source I get this thing in browser&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__2-1664909875973.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32178iACF1C0150B8B86FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__2-1664909875973.png" alt="Ivan__2-1664909875973.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If look closely to URL it contains code that I need to extract automatically&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__3-1664909936674.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32179iFB5CBE68D98F18A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__3-1664909936674.png" alt="Ivan__3-1664909936674.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It looks exactly as code in browser during usual approve&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__6-1664910167871.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32182i57E2B12FBD801261/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__6-1664910167871.png" alt="Ivan__6-1664910167871.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I copied it to request for generating token&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__4-1664910090596.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32180i12664DCDAEFEE878/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__4-1664910090596.png" alt="Ivan__4-1664910090596.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I receive error&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__5-1664910127506.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32181iC3DB9DF602BB7118/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__5-1664910127506.png" alt="Ivan__5-1664910127506.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I do not know what I am doing wrong&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I execute this code&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__7-1664910323598.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32183i8403D4051F46E21D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__7-1664910323598.png" alt="Ivan__7-1664910323598.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It will give me approve code after confirmation in browser&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__8-1664910382205.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32184i80E234C3B4093D7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__8-1664910382205.png" alt="Ivan__8-1664910382205.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;via which the token is generated successfully&lt;/P&gt;&lt;P&gt;But when I try to do all same with only one difference, that after user's confirmation this approve code will be extracted by program via this code&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__9-1664910505173.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32186i5E6DF76DCB87272C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__9-1664910505173.png" alt="Ivan__9-1664910505173.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get error that I described above&lt;/P&gt;&lt;P&gt;To sum up : the only thing that I need to implement is to make automatic approve code extraction, without making user to copy this code from browser manually&lt;/P&gt;</description>
    <pubDate>Tue, 04 Oct 2022 21:34:49 GMT</pubDate>
    <dc:creator>Ivan_</dc:creator>
    <dc:date>2022-10-04T21:34:49Z</dc:date>
    <item>
      <title>How to programmatically get the Authorization code without requiring the user approval in OAuth 2.0</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/626621#M28974</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to get approve code programmatically without this form via c# code&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__0-1664794638293.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32107i7B4A0E2C846A137E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__0-1664794638293.png" alt="Ivan__0-1664794638293.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;this is my code&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__1-1664794703052.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32108iB9545EA627284813/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__1-1664794703052.png" alt="Ivan__1-1664794703052.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;How it should be modified in order to get approve code automatically without user actions ?&lt;/P&gt;
&lt;P&gt;Thanks in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 11:26:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/626621#M28974</guid>
      <dc:creator>Ivan_</dc:creator>
      <dc:date>2022-10-03T11:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/626658#M28977</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1579295"&gt;@Ivan_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;I need to get approve code programmatically ...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You can use redirect URL and listen to there. What actually are you using the 'http' object for? &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;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1579295"&gt;@Ivan_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;How it should be modified in order to get approve code automatically without user actions ?&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It's not possible for user side authentication (or least not a good idea). It's only possible on server side with pre-authentication and embedded credentials into the server, if applicable in your case.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 13:01:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/626658#M28977</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-10-03T13:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/626715#M28982</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1579295"&gt;@Ivan_&lt;/a&gt;&amp;nbsp;Здравко is correct, to receive the authorization code programmatically, you should use a redirect URI. You can find more information on how this process works in the &lt;A href="https://developers.dropbox.com/oauth-guide" target="_blank"&gt;OAuth Guide&lt;/A&gt; and &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_blank"&gt;authorization documentation&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note that it is not possible to fully automate the OAuth process where the user chooses to authorize the app and the app then receives the resulting access token and optional refresh token. 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" rel="noreferrer" target="_blank"&gt;the official Dropbox API v2 .NET SDK&lt;/A&gt; in C#, you can find an example of getting and using an access token and refresh token, via a redirect URI, 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>Mon, 03 Oct 2022 15:51:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/626715#M28982</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-10-03T15:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/627108#M29002</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790" target="_self"&gt;&lt;SPAN class=""&gt;Здравко&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I tried to do this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__0-1664909640346.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32176iEC483B53D05C20EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__0-1664909640346.png" alt="Ivan__0-1664909640346.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I faced with such problem :&lt;/P&gt;&lt;P&gt;Firstly I am sending the request in order to get Approve code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__1-1664909755923.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32177i402000B931AD1750/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__1-1664909755923.png" alt="Ivan__1-1664909755923.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After I performed confirmation in browser that I am trusting source I get this thing in browser&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__2-1664909875973.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32178iACF1C0150B8B86FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__2-1664909875973.png" alt="Ivan__2-1664909875973.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If look closely to URL it contains code that I need to extract automatically&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__3-1664909936674.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32179iFB5CBE68D98F18A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__3-1664909936674.png" alt="Ivan__3-1664909936674.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It looks exactly as code in browser during usual approve&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__6-1664910167871.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32182i57E2B12FBD801261/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__6-1664910167871.png" alt="Ivan__6-1664910167871.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I copied it to request for generating token&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__4-1664910090596.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32180i12664DCDAEFEE878/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__4-1664910090596.png" alt="Ivan__4-1664910090596.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I receive error&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__5-1664910127506.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32181iC3DB9DF602BB7118/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__5-1664910127506.png" alt="Ivan__5-1664910127506.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I do not know what I am doing wrong&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I execute this code&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__7-1664910323598.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32183i8403D4051F46E21D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__7-1664910323598.png" alt="Ivan__7-1664910323598.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It will give me approve code after confirmation in browser&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__8-1664910382205.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32184i80E234C3B4093D7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__8-1664910382205.png" alt="Ivan__8-1664910382205.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;via which the token is generated successfully&lt;/P&gt;&lt;P&gt;But when I try to do all same with only one difference, that after user's confirmation this approve code will be extracted by program, not by user manually via this code&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__9-1664910505173.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32186i5E6DF76DCB87272C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__9-1664910505173.png" alt="Ivan__9-1664910505173.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get error that I described above&lt;/P&gt;&lt;P&gt;To sum up : the only thing that I need to implement is to make automatic approve_code extraction, without making user to copy this code from browser manually after user approved that he trusts source&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 19:11:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/627108#M29002</guid>
      <dc:creator>Ivan_</dc:creator>
      <dc:date>2022-10-04T19:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/627124#M29006</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790" target="_self"&gt;&lt;SPAN class=""&gt;Здравко&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I tried to do this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__0-1664909640346.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32176iEC483B53D05C20EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__0-1664909640346.png" alt="Ivan__0-1664909640346.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I faced with such problem :&lt;/P&gt;&lt;P&gt;Firstly I am sending the request in order to get Approve code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__1-1664909755923.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32177i402000B931AD1750/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__1-1664909755923.png" alt="Ivan__1-1664909755923.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After I performed confirmation in browser that I am trusting source I get this thing in browser&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__2-1664909875973.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32178iACF1C0150B8B86FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__2-1664909875973.png" alt="Ivan__2-1664909875973.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If look closely to URL it contains code that I need to extract automatically&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__3-1664909936674.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32179iFB5CBE68D98F18A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__3-1664909936674.png" alt="Ivan__3-1664909936674.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It looks exactly as code in browser during usual approve&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__6-1664910167871.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32182i57E2B12FBD801261/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__6-1664910167871.png" alt="Ivan__6-1664910167871.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I copied it to request for generating token&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__4-1664910090596.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32180i12664DCDAEFEE878/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__4-1664910090596.png" alt="Ivan__4-1664910090596.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I receive error&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__5-1664910127506.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32181iC3DB9DF602BB7118/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__5-1664910127506.png" alt="Ivan__5-1664910127506.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I do not know what I am doing wrong&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I execute this code&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__7-1664910323598.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32183i8403D4051F46E21D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__7-1664910323598.png" alt="Ivan__7-1664910323598.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It will give me approve code after confirmation in browser&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__8-1664910382205.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32184i80E234C3B4093D7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__8-1664910382205.png" alt="Ivan__8-1664910382205.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;via which the token is generated successfully&lt;/P&gt;&lt;P&gt;But when I try to do all same with only one difference, that after user's confirmation this approve code will be extracted by program via this code&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__9-1664910505173.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32186i5E6DF76DCB87272C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__9-1664910505173.png" alt="Ivan__9-1664910505173.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get error that I described above&lt;/P&gt;&lt;P&gt;To sum up : the only thing that I need to implement is to make automatic approve code extraction, without making user to copy this code from browser manually&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 21:34:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/627124#M29006</guid>
      <dc:creator>Ivan_</dc:creator>
      <dc:date>2022-10-04T21:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/627269#M29016</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1579295"&gt;@Ivan_&lt;/a&gt; The 127.0.0.1:52475 address seen in your screenshot is the address of a local server that should be used to programmatically receive the authorization code. Please refer to the examples as written to see how that is extracted:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/OauthBasic/Program.cs" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/OauthBasic/Program.cs&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/OAuthPKCE/Program.cs" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/OAuthPKCE/Program.cs&lt;/A&gt; &lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 05 Oct 2022 13:49:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/627269#M29016</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-10-05T13:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/627299#M29019</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1579295"&gt;@Ivan_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;After I performed confirmation in browser that I am trusting source I get this thing in browser&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__2-1664909875973.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32178iACF1C0150B8B86FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__2-1664909875973.png" alt="Ivan__2-1664909875973.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If look closely to URL it contains code that I need to extract automatically ...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, that's a desired behavior. The code (together with state) is passed as a HTTP query parameter (as denoted in &lt;A title="Authorization" href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; too).&lt;/P&gt;&lt;P&gt;In addition to what Greg said, can be noted that pointed examples use second redirection step (don't ask me why; seems confusing, but...🤷). It can be implemented much simpler, but somebody have decided so (you are not mandated to follow the examples 1 to 1 - just get the idea out of there). For some reason the second redirection step seems doesn't comes up and so you can see the URL you are seeing. There can be different reasons, but at the beginning take a look if you give back to the browser the &lt;A title="index.html" href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/OauthBasic/index.html" target="_blank" rel="noopener"&gt;JS code&lt;/A&gt; responsible for the second redirection step and why this step fails (if you think still to follow the examples 1 to 1 - with step for second redirection).&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 14:51:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/627299#M29019</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-10-05T14:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/632336#M29187</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for provided links&amp;nbsp;&lt;/P&gt;&lt;P&gt;I faced with following problem&amp;nbsp;&lt;/P&gt;&lt;P&gt;In console application everything works fine and token successfully generated&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__2-1666893402686.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32629i983AD071B4350391/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__2-1666893402686.png" alt="Ivan__2-1666893402686.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I attach body of the await methods&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__1-1666893159627.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32628iB4A7F7E09F460AD6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__1-1666893159627.png" alt="Ivan__1-1666893159627.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Some important notes :&amp;nbsp;&lt;/P&gt;&lt;P&gt;RedirectUri variable is local host&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__3-1666893473602.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32630i48326412ED43F7D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__3-1666893473602.png" alt="Ivan__3-1666893473602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;redirectUri is bariable with value that DropBox returns to me with approve code&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__4-1666893592499.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32631i6EF9960B71D249F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__4-1666893592499.png" alt="Ivan__4-1666893592499.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The rest part of the code is same to the example that is provided in documentation&lt;/P&gt;&lt;P&gt;The problem is that this code does not work in my Application. It stops at&amp;nbsp;Proce/ssCodeFlowAsync method and after that the eternal loading of response begins. Sometimes eternal loading begins at&amp;nbsp;HandleJSRedirect and&amp;nbsp;HandleOAuth2Redirect methods, I do not know what causes such behavior.&lt;/P&gt;&lt;P&gt;I want to mention that in&amp;nbsp; Console Application everything works great, without any troubles, but when I execute same code in my project app - eternal loading always starts, it looks like some troubles with threads, but I do not know what is wrong.&lt;/P&gt;&lt;P&gt;Here is my code in text&lt;/P&gt;&lt;P&gt;var http = new HttpListener();&lt;BR /&gt;http.Prefixes.Add(LoopbackHost);&lt;BR /&gt;http.Start();&lt;/P&gt;&lt;P&gt;var state = Guid.NewGuid().ToString("N");&lt;BR /&gt;var authorizeUri = DropboxOAuth2Helper.GetAuthorizeUri(OAuthResponseType.Code, ApiKey,&lt;BR /&gt;RedirectUri, state: state, tokenAccessType: TokenAccessType.Offline, scopeList: scopeList, includeGrantedScopes: includeGrantedScopes);&lt;BR /&gt;&lt;BR /&gt;System.Diagnostics.Process.Start(authorizeUri.ToString());&lt;/P&gt;&lt;P&gt;// Handle OAuth redirect and send URL fragment to local server using JS.&lt;BR /&gt;await HandleOAuth2Redirect(http);&lt;/P&gt;&lt;P&gt;// Handle redirect from JS and process OAuth response.&lt;BR /&gt;var redirectUri = await HandleJSRedirect(http);&lt;/P&gt;&lt;P&gt;var tokenResult = await DropboxOAuth2Helper.ProcessCodeFlowAsync(redirectUri, ApiKey, ApiSecret, RedirectUri.ToString(), state);&lt;BR /&gt;Console.WriteLine("Finished Exchanging Code for Token");&lt;BR /&gt;string Access = tokenResult.AccessToken;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;private async Task&amp;lt;Uri&amp;gt; HandleJSRedirect(HttpListener http)&lt;BR /&gt;{&lt;BR /&gt;var context = await http.GetContextAsync();&lt;BR /&gt;// We only care about request to TokenRedirectUri endpoint.&lt;BR /&gt;//while (context.Request.Url.AbsolutePath != JSRedirectUri.AbsolutePath)&lt;BR /&gt;//{&lt;BR /&gt;// context = await http.GetContextAsync();&lt;BR /&gt;//}&lt;BR /&gt;Uri redirectUri = new Uri(context.Request.UrlReferrer.ToString());&lt;BR /&gt;return redirectUri;&lt;BR /&gt;}&lt;BR /&gt;private async Task HandleOAuth2Redirect(HttpListener http)&lt;BR /&gt;{&lt;BR /&gt;var context = await http.GetContextAsync();&lt;BR /&gt;// We only care about request to RedirectUri endpoint.&lt;BR /&gt;while (context.Request.Url.AbsolutePath != RedirectUri.AbsolutePath)&lt;BR /&gt;{&lt;BR /&gt;context = await http.GetContextAsync();&lt;BR /&gt;}&lt;BR /&gt;//context.Response.ContentType = "text/html";&lt;BR /&gt;//Respond with a page which runs JS and sends URL fragment as query string&lt;BR /&gt;//to TokenRedirectUri.&lt;BR /&gt;//using (var file = File.OpenRead("index.html"))&lt;BR /&gt;//{&lt;BR /&gt;// file.CopyTo(context.Response.OutputStream);&lt;BR /&gt;//}&lt;BR /&gt;context.Response.OutputStream.Close();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 18:01:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/632336#M29187</guid>
      <dc:creator>Ivan_</dc:creator>
      <dc:date>2022-10-27T18:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/632337#M29188</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790"&gt;@Здравко&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for provided information&lt;/P&gt;&lt;P&gt;I faced with following problem&amp;nbsp;&lt;/P&gt;&lt;P&gt;In console application everything works fine and token successfully generated&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__2-1666893402686.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32629i983AD071B4350391/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__2-1666893402686.png" alt="Ivan__2-1666893402686.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I attach body of the await methods&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__1-1666893159627.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32628iB4A7F7E09F460AD6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__1-1666893159627.png" alt="Ivan__1-1666893159627.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Some important notes :&amp;nbsp;&lt;/P&gt;&lt;P&gt;RedirectUri variable is local host&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__3-1666893473602.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32630i48326412ED43F7D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__3-1666893473602.png" alt="Ivan__3-1666893473602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;redirectUri is bariable with value that DropBox returns to me with approve code&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ivan__4-1666893592499.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/32631i6EF9960B71D249F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ivan__4-1666893592499.png" alt="Ivan__4-1666893592499.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The rest part of the code is same to the example that is provided in documentation&lt;/P&gt;&lt;P&gt;The problem is that this code does not work in my Application. It stops at&amp;nbsp;Proce/ssCodeFlowAsync method and after that the eternal loading of response begins. Sometimes eternal loading begins at&amp;nbsp;HandleJSRedirect and&amp;nbsp;HandleOAuth2Redirect methods, I do not know what causes such behavior.&lt;/P&gt;&lt;P&gt;I want to mention that in&amp;nbsp; Console Application everything works great, without any troubles, but when I execute same code in my project app - eternal loading always starts, it looks like some troubles with threads, but I do not know what is wrong.&lt;/P&gt;&lt;P&gt;Here is my code in text&lt;/P&gt;&lt;P&gt;var http = new HttpListener();&lt;BR /&gt;http.Prefixes.Add(LoopbackHost);&lt;BR /&gt;http.Start();&lt;/P&gt;&lt;P&gt;var state = Guid.NewGuid().ToString("N");&lt;BR /&gt;var authorizeUri = DropboxOAuth2Helper.GetAuthorizeUri(OAuthResponseType.Code, ApiKey,&lt;BR /&gt;RedirectUri, state: state, tokenAccessType: TokenAccessType.Offline, scopeList: scopeList, includeGrantedScopes: includeGrantedScopes);&lt;BR /&gt;&lt;BR /&gt;System.Diagnostics.Process.Start(authorizeUri.ToString());&lt;/P&gt;&lt;P&gt;// Handle OAuth redirect and send URL fragment to local server using JS.&lt;BR /&gt;await HandleOAuth2Redirect(http);&lt;/P&gt;&lt;P&gt;// Handle redirect from JS and process OAuth response.&lt;BR /&gt;var redirectUri = await HandleJSRedirect(http);&lt;/P&gt;&lt;P&gt;var tokenResult = await DropboxOAuth2Helper.ProcessCodeFlowAsync(redirectUri, ApiKey, ApiSecret, RedirectUri.ToString(), state);&lt;BR /&gt;Console.WriteLine("Finished Exchanging Code for Token");&lt;BR /&gt;string Access = tokenResult.AccessToken;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;private async Task&amp;lt;Uri&amp;gt; HandleJSRedirect(HttpListener http)&lt;BR /&gt;{&lt;BR /&gt;var context = await http.GetContextAsync();&lt;BR /&gt;// We only care about request to TokenRedirectUri endpoint.&lt;BR /&gt;//while (context.Request.Url.AbsolutePath != JSRedirectUri.AbsolutePath)&lt;BR /&gt;//{&lt;BR /&gt;// context = await http.GetContextAsync();&lt;BR /&gt;//}&lt;BR /&gt;Uri redirectUri = new Uri(context.Request.UrlReferrer.ToString());&lt;BR /&gt;return redirectUri;&lt;BR /&gt;}&lt;BR /&gt;private async Task HandleOAuth2Redirect(HttpListener http)&lt;BR /&gt;{&lt;BR /&gt;var context = await http.GetContextAsync();&lt;BR /&gt;// We only care about request to RedirectUri endpoint.&lt;BR /&gt;while (context.Request.Url.AbsolutePath != RedirectUri.AbsolutePath)&lt;BR /&gt;{&lt;BR /&gt;context = await http.GetContextAsync();&lt;BR /&gt;}&lt;BR /&gt;//context.Response.ContentType = "text/html";&lt;BR /&gt;//Respond with a page which runs JS and sends URL fragment as query string&lt;BR /&gt;//to TokenRedirectUri.&lt;BR /&gt;//using (var file = File.OpenRead("index.html"))&lt;BR /&gt;//{&lt;BR /&gt;// file.CopyTo(context.Response.OutputStream);&lt;BR /&gt;//}&lt;BR /&gt;context.Response.OutputStream.Close();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 18:02:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/632337#M29188</guid>
      <dc:creator>Ivan_</dc:creator>
      <dc:date>2022-10-27T18:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/632362#M29189</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1579295"&gt;@Ivan_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;The problem is that this code does not work in my Application. It stops at&amp;nbsp;Proce/ssCodeFlowAsync method and after that the eternal loading of response begins. Sometimes eternal loading begins at&amp;nbsp;HandleJSRedirect and&amp;nbsp;HandleOAuth2Redirect methods, I do not know what causes such behavior.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1579295"&gt;@Ivan_&lt;/a&gt;, the code is for one time use!!! Once you get your credentials (access token and refresh token) the code isn't valid anymore! You should keep received credentials (primary the refresh token) and reuse later when needed to construct client object. Why after the authentication (you have credentials already) are you calling still handlers designate for initial authentication? &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; I cannot see a reason.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 20:13:22 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/632362#M29189</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-10-27T20:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/632367#M29190</link>
      <description>&lt;P&gt;Understood, thanks&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 20:50:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/632367#M29190</guid>
      <dc:creator>Ivan_</dc:creator>
      <dc:date>2022-10-27T20:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/723663#M31968</link>
      <description>&lt;P&gt;We need a clear full functional example, how&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Get Autorization code in plain easy way&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e and vou to get accesstoken buy using it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Until now its totaly teorical.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 15:50:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/723663#M31968</guid>
      <dc:creator>chemical21</dc:creator>
      <dc:date>2023-10-23T15:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/723671#M31969</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/684310"&gt;@chemical21&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;We need a clear full functional example, how&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;One example in Python can be seen &lt;A href="https://www.dropboxforum.com/t5/Create-upload-and-share/How-can-a-script-or-app-get-a-shareable-Dropbox-link/m-p/680928/highlight/true#M68463" target="_blank" rel="noopener"&gt;here&lt;/A&gt;. It's easy to "translate" it to any other programing language, convenient for you. In every SDKs are examples too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/684310"&gt;@chemical21&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Get Autorization code in plain easy way&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;What do you mean "code in plain easy way"?&amp;nbsp;&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; You can receive it either as text in the page or through redirects - whatever is more convenient for you in particular use case. Just keep in mind that for long term usage, you will need refresh token (offline access), not only access token.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 16:02:23 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/723671#M31969</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-10-23T16:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/723674#M31970</link>
      <description>&lt;P&gt;The better example could be a form with 3 buttons and textboxs:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Button1 - Get autorization code and fill a textbox1 with url string to get accesstoken&lt;/P&gt;&lt;P&gt;Button2 - Get Accestoken and fill a textbox with the url string with the accesstoken grant access finaly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Button3 - Click and get the access the resources needed.&lt;/P&gt;&lt;P&gt;and a result of all this in a testbox.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 16:08:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/723674#M31970</guid>
      <dc:creator>chemical21</dc:creator>
      <dc:date>2023-10-23T16:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically get the Authorization code without requiring the user approval in OAuth</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/723677#M31971</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/684310"&gt;@chemical21&lt;/a&gt; Thanks for the feedback!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 16:16:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-programmatically-get-the-Authorization-code-without/m-p/723677#M31971</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-10-23T16:16:02Z</dc:date>
    </item>
  </channel>
</rss>

