<?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:  Missing query parameter 'state' in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-state/m-p/119602#M3479</link>
    <description>&lt;P&gt;I tried to insert a "state" parameter in the authorizaion_url like the Core API Document said.&lt;BR /&gt;
But I don't know what's the value to pass.&lt;BR /&gt;
The response said that it's "dropbox-auth-finish: CSRF mismatch: Expected" but I'm using a fixed authorization_url .&lt;BR /&gt;
There is a way to eceed this parameter???&lt;/P&gt;

&lt;P&gt;Thank you &lt;BR /&gt;
Sorry for the delay &lt;BR /&gt;
:)&lt;/P&gt;</description>
    <pubDate>Wed, 13 May 2015 03:13:12 GMT</pubDate>
    <dc:creator>Riccardo A.</dc:creator>
    <dc:date>2015-05-13T03:13:12Z</dc:date>
    <item>
      <title>Missing query parameter 'state'</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-state/m-p/119599#M3476</link>
      <description>&lt;P&gt;I use Dropbox Core API to work with Dropbox. And I impement recently hwioauthbundle in Symfony for a fast authentication. Before this all function upload,download,list files work well. But I have this error :&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;/dropbox-auth-finish: bad request: Missing query parameter 'state'&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;It seems that the &lt;CODE&gt;$_GET&lt;/CODE&gt; array doesn't contain &lt;CODE&gt;state&lt;/CODE&gt; value, but I try to set this parameter with some values but it didn't work. And now I don't know what do. In the HTTP Response there isn't state parametrer.&lt;/P&gt;

&lt;P&gt;If you know something, answer here.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;list($accessToken,$userId, $urlState) = $this-&amp;gt;webAuth-&amp;gt;finish($_GET);

$this-&amp;gt;dbxClient = new dbx\Client($accessToken, "PHP-Example/1.0");
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:43:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-state/m-p/119599#M3476</guid>
      <dc:creator>Riccardo A.</dc:creator>
      <dc:date>2019-05-29T09:43:05Z</dc:date>
    </item>
    <item>
      <title>Re:  Missing query parameter 'state'</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-state/m-p/119600#M3477</link>
      <description>&lt;P&gt;Moved to the API forum.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 19:42:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-state/m-p/119600#M3477</guid>
      <dc:creator>Rich</dc:creator>
      <dc:date>2015-05-08T19:42:09Z</dc:date>
    </item>
    <item>
      <title>Re:  Missing query parameter 'state'</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-state/m-p/119601#M3478</link>
      <description>&lt;P&gt;[Cross-linking for reference: &lt;A href="https://stackoverflow.com/questions/30106962/dropbox-bad-request-missing-query-parameter-state" rel="nofollow noreferrer"&gt;https://stackoverflow.com/questions/30106962/dropbox-bad-request-missing-query-parameter-state&lt;/A&gt; ]&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;WebAuth.finish&lt;/CODE&gt; method checks the &lt;CODE&gt;state&lt;/CODE&gt; value included on the redirect to your &lt;CODE&gt;redirect_uri&lt;/CODE&gt; when the user is sent back to your app by Dropbox during the OAuth 2 app authorization flow. (This protects against CSRF attacks.) This error indicates that your &lt;CODE&gt;$_GET&lt;/CODE&gt; array doesn't include &lt;CODE&gt;state&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;To track down where the issue is, I'd check a few things to see where the &lt;CODE&gt;state&lt;/CODE&gt; value is lost:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;does the full URL for /dropbox-auth-finish when the user is redirected back to your app have the &lt;CODE&gt;state&lt;/CODE&gt; parameter?&lt;/LI&gt;
&lt;LI&gt;does the app authorization URL your app sends the user to (which should start with &lt;A href="https://www.dropbox.com/1/oauth2/authorize" rel="nofollow noreferrer"&gt;https://www.dropbox.com/1/oauth2/authorize&lt;/A&gt;) have the &lt;CODE&gt;state&lt;/CODE&gt; parameter?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sat, 09 May 2015 03:03:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-state/m-p/119601#M3478</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-05-09T03:03:48Z</dc:date>
    </item>
    <item>
      <title>Re:  Missing query parameter 'state'</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-state/m-p/119602#M3479</link>
      <description>&lt;P&gt;I tried to insert a "state" parameter in the authorizaion_url like the Core API Document said.&lt;BR /&gt;
But I don't know what's the value to pass.&lt;BR /&gt;
The response said that it's "dropbox-auth-finish: CSRF mismatch: Expected" but I'm using a fixed authorization_url .&lt;BR /&gt;
There is a way to eceed this parameter???&lt;/P&gt;

&lt;P&gt;Thank you &lt;BR /&gt;
Sorry for the delay &lt;BR /&gt;
:)&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2015 03:13:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-state/m-p/119602#M3479</guid>
      <dc:creator>Riccardo A.</dc:creator>
      <dc:date>2015-05-13T03:13:12Z</dc:date>
    </item>
    <item>
      <title>Re:  Missing query parameter 'state'</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-state/m-p/119603#M3480</link>
      <description>&lt;P&gt;The &lt;CODE&gt;state&lt;/CODE&gt; value is generated by the PHP SDK for you, and is passed through the OAuth app authorization flow. You shouldn't have to set it yourself. I'm not familiar with hwioauthbundle, but it's possible it's consuming it before you can get to it.  Can you post the details I asked for in my last reply? Can you post the relevant code?&lt;/P&gt;

&lt;P&gt;Also, what do you mean when you say you're "using a fixed authorization_url"? The authorization URL should be generated (e.g., using &lt;CODE&gt;WebAuth.start&lt;/CODE&gt;) when the user wants to link to your app.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2015 05:11:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Missing-query-parameter-state/m-p/119603#M3480</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-05-13T05:11:38Z</dc:date>
    </item>
  </channel>
</rss>

