<?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 Missing query parameter 'responseUri' in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-responseUri/m-p/659631#M29979</link>
    <description>&lt;P&gt;I making MVC application and trying to refresh token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;const string redirectUrl = "https://www.dropbox.com/1/oauth2/redirect_receiver";
           // string oauthUrl = $@"https://www.dropbox.com/1/oauth2/authorize?response_type=token&amp;amp;redirect_uri={redirectUrl}&amp;amp;client_id={AppKey}";
            
            string oauth2State;
            oauth2State = Guid.NewGuid().ToString("N");
            Uri authorizeUri =  DropboxOAuth2Helper.GetAuthorizeUri(OAuthResponseType.Token, ApiKey, redirectUrl, state: oauth2State);

            OAuth2Response tokenResult = await DropboxOAuth2Helper.ProcessCodeFlowAsync(authorizeUri, ApiKey, ApiSecret,null,oauth2State);
           &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;End getting error:&amp;nbsp;&lt;SPAN&gt;The responseUri is missing a code value in the query component&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2023 14:21:06 GMT</pubDate>
    <dc:creator>Tomtit</dc:creator>
    <dc:date>2023-02-14T14:21:06Z</dc:date>
    <item>
      <title>Missing query parameter 'responseUri'</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-responseUri/m-p/659631#M29979</link>
      <description>&lt;P&gt;I making MVC application and trying to refresh token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;const string redirectUrl = "https://www.dropbox.com/1/oauth2/redirect_receiver";
           // string oauthUrl = $@"https://www.dropbox.com/1/oauth2/authorize?response_type=token&amp;amp;redirect_uri={redirectUrl}&amp;amp;client_id={AppKey}";
            
            string oauth2State;
            oauth2State = Guid.NewGuid().ToString("N");
            Uri authorizeUri =  DropboxOAuth2Helper.GetAuthorizeUri(OAuthResponseType.Token, ApiKey, redirectUrl, state: oauth2State);

            OAuth2Response tokenResult = await DropboxOAuth2Helper.ProcessCodeFlowAsync(authorizeUri, ApiKey, ApiSecret,null,oauth2State);
           &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;End getting error:&amp;nbsp;&lt;SPAN&gt;The responseUri is missing a code value in the query component&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 14:21:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-responseUri/m-p/659631#M29979</guid>
      <dc:creator>Tomtit</dc:creator>
      <dc:date>2023-02-14T14:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Missing query parameter 'responseUri'</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-responseUri/m-p/659651#M29980</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1615739"&gt;@Tomtit&lt;/a&gt;, Would be much easier if you start with some simple test code (something like shown &lt;A title="SimpleTest" href="https://github.com/dropbox/dropbox-sdk-dotnet/tree/main/dropbox-sdk-dotnet/Examples/SimpleTest" target="_blank" rel="noopener"&gt;here&lt;/A&gt;).&amp;nbsp;&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; Once you got it running, you can play with different code modifications there.&lt;/P&gt;&lt;P&gt;It's more automated when redirect URI points to local address rather external one for standalone local application. In referred example such URI is calculated &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/SimpleTest/Program.cs#L27" target="_blank" rel="noopener"&gt;here&lt;/A&gt; and is "extended" from local host (defined &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/SimpleTest/Program.cs#L23" target="_blank" rel="noopener"&gt;little above&lt;/A&gt;). The same URI (i.e. &lt;A href="http://127.0.0.1:52475/authorize" target="_blank"&gt;http://127.0.0.1:52475/authorize&lt;/A&gt; for particular example) should be registered for your application to be acceptable for Dropbox (security measure). As you can see in the example, authorizeURI (generated &lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/main/dropbox-sdk-dotnet/Examples/SimpleTest/Program.cs#L237" target="_blank" rel="noopener"&gt;here&lt;/A&gt;) is used for launching your system browser rather than processing with API further (i.e. it's web address, not a API call or parameter of such call). In your post you are trying incorrect processing in the same context! The result from link confirmation (made by hand) gets received as a result of redirect handling (in the particular example in 2 steps - in HandleOAuth2Redirect and HandleJSRedirect functions bodies). &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;P&gt;Hope this gives direction.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 14:57:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-responseUri/m-p/659651#M29980</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-02-14T14:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Missing query parameter 'responseUri'</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-responseUri/m-p/659703#M29981</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1615739"&gt;@Tomtit&lt;/a&gt; Like Здравко said, I also recommend starting with an unmodified sample app to see that working first, before making changes or implementing your own.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, as they pointed out, your code that you shared here is incorrect because it is passing the authorization URL itself to ProcessCodeFlowAsync. That won't work because the authorization URI is the location of the web page where the user needs to manually authorize the app once. It's the resulting redirect URI (containing the authorization code) that you should pass to the responseUri parameter of ProcessCodeFlowAsync, like I described in &lt;A href="https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/ASP-NET-MVC-refresh-token-for-DropBox-have-an-error-invalid/m-p/658950" target="_blank"&gt;your other thread&lt;/A&gt;. (Alternatively, you can pass just the authorization code string as the 'code' parameter.)&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 16:55:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-responseUri/m-p/659703#M29981</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-02-14T16:55:48Z</dc:date>
    </item>
  </channel>
</rss>

