A reCaptcha error
A reCaptcha error

I found this message on a site in Google reCaptcha that appeared to be working, so why the error message?

We detected that your site isn’t verifying reCAPTCHA solutions. This is required for the proper use of reCAPTCHA on your site. Please see our developer site for more information.

In my case I was following the developer guidelines.

Which consist of:

  1. Get the g-recaptcha-response POST parameter when the user submits the form on your site
  2. After you get the response token, you need to verify it within two minutes with reCAPTCHA using the following API to ensure the token is valid. (https://www.google.com/recaptcha/api/siteverify METHOD: POST, including secret and response)

When testing I got the response:

{ "success": true, "challenge_ts": "2021-12-02T19:42:19Z", "hostname": "localhost" }

And on fail:

{ "success": false, "error-codes": [ "missing-input-response" ] }

So what’s the problem?

Many of the tests on my localhost meant I was using the captcha but not actually sending the response for validation – there was an override that meant the validation code was skipped when I was developing locally, probably to save bothering with captchas when it was all working! But this fact, that I was generating codes but not validating them, seems to have generated this message.

Last modified: December 2, 2021

Author

Comments

Write a Reply or Comment

Your email address will not be published.