Note that there are some explanatory texts on larger screens.

plurals
  1. POPost to ReCAPTCHA
    primarykey
    data
    text
    <p>I am trying to post to recapture from c# code.</p> <pre><code> var data = new NameValueCollection { { "privatekey", "my key" }, { "remoteip ", "" }, { "challenge ", model.recaptcha_challenge_field }, { "response ", model.recaptcha_response_field } }; using (var client = new WebClient()) { var response = client.UploadValues("http://www.google.com/recaptcha/api/verify", data: data); var result = ASCIIEncoding.ASCII.GetString(response); } </code></pre> <p>When I do this result is returning</p> <pre><code>false invalid-request-cookie </code></pre> <p>Do I need to set the remote IP? What else could be going wrong?</p> <p><strong>Update</strong></p> <p><a href="https://developers.google.com/recaptcha/docs/verify" rel="nofollow">https://developers.google.com/recaptcha/docs/verify</a> says the error means:</p> <blockquote> <p><a href="https://developers.google.com/recaptcha/docs/verify" rel="nofollow">https://developers.google.com/recaptcha/docs/verify</a></p> </blockquote> <p>The value of the html on page is as follows:</p> <pre><code>&lt;INPUT id=recaptcha_challenge_field value=03AHJ_VusdI2SY_P2iM3VICgLmOw-7CE7F6zmOwvwfya4L8Jeiok_rCwVmHFJwJHxlelhp8By_QTA7SNF58fwijij5rxBLqgpoI3nuWy6S0HGL7U7lk_35aazPfaMyVwbeWuWJyxJ0DqjwDwrByD4AY70O0qlaTnCUxQ type=hidden name=recaptcha_challenge_field /&gt; </code></pre> <p>In the object I post back it is as follows:</p> <p><code>“recaptcha_challenge_field=03AHJ_VusdI2SY_P2iM3VICgLmOw-7CE7F6zmOwvwfya4L8Jeiok_rCwVmHFJwJHxlelhp8By_QTA7SNF58fwijij5rxBLqgpoI3nuWy6S0HGL7U7lk_35aazPfaMyVwbeWuWJyxJ0DqjwDwrByD4AY70O0qlaTnCUxQ&amp;recaptcha_response_field=re</code>merh+much"</p> <p>and when i get it on the server the value is</p> <pre><code>03AHJ_VusdI2SY_P2iM3VICgLmOw-7CE7F6zmOwvwfya4L8Jeiok_rCwVmHFJwJHxlelhp8By_QTA7SNF58fwijij5rxBLqgpoI3nuWy6S0HGL7U7lk_35aazPfaMyVwbeWuWJyxJ0DqjwDwrByD4AY70O0qlaTnCUxQ </code></pre> <p>So if we put all 3 value side by side we have:</p> <pre><code>03AHJ_VusdI2SY_P2iM3VICgLmOw-7CE7F6zmOwvwfya4L8Jeiok_rCwVmHFJwJHxlelhp8By_QTA7SNF58fwijij5rxBLqgpoI3nuWy6S0HGL7U7lk_35aazPfaMyVwbeWuWJyxJ0DqjwDwrByD4AY70O0qlaTnCUxQ 03AHJ_VusdI2SY_P2iM3VICgLmOw-7CE7F6zmOwvwfya4L8Jeiok_rCwVmHFJwJHxlelhp8By_QTA7SNF58fwijij5rxBLqgpoI3nuWy6S0HGL7U7lk_35aazPfaMyVwbeWuWJyxJ0DqjwDwrByD4AY70O0qlaTnCUxQ 03AHJ_VusdI2SY_P2iM3VICgLmOw-7CE7F6zmOwvwfya4L8Jeiok_rCwVmHFJwJHxlelhp8By_QTA7SNF58fwijij5rxBLqgpoI3nuWy6S0HGL7U7lk_35aazPfaMyVwbeWuWJyxJ0DqjwDwrByD4AY70O0qlaTnCUxQ </code></pre> <p>The recapture on the page is being generated by calling the following:</p> <pre><code>Recaptcha.create("pub key", "myDiv", { theme: "clean", callback: Recaptcha.focus_response_field } ); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload