Recommendations for java captcha libraries [closed]

I am the author of SimpleCaptcha. While I would recommend — for humanity’s sake — using ReCaptcha where you can, I provided SimpleCaptcha because some organizations have policies which prohibit libraries like ReCaptcha. SimpleCaptcha is meant to be entirely stand-alone, with no external dependencies: as long as you are in a J2EE container, you should … Read more

reCAPTCHA – error-codes: ‘missing-input-response’, ‘missing-input-secret’ when verifying user’s response (missing details on POST)

Doing a bit of research and digging around the reCaptcha Google forums, It seems that this endpoint only accepts the default content type; application/x-www-form-urlencoded. Which means you should not use JSON to send your response token and site key. Instead, send the value as how the application/x-www-form-urlencoded defined: Forms submitted with this content type must … Read more

Is it possible to force fail a recaptcha v2 for testing purposes? (I.e. pretend to be a robot)

In the Dev Tools, open Settings, then Devices, add a custom device with any name and user agent equal to Googlebot/2.1. Finally, in Device Mode, at the left of the top bar, choose the device (the default is Responsive). You can test the captcha in https://www.google.com/recaptcha/api2/demo?invisible=true (This is a demo of the Invisible Recaptcha. You … Read more

How to validate Google reCAPTCHA v3 on server side?

Private key safety While the answers here are definately working, they are using a GET request, which exposes your private key (even though https is used). On Google Developers the specified method is POST. For a little bit more detail: https://stackoverflow.com/a/323286/1680919 Verification via POST function isValid() { try { $url=”https://www.google.com/recaptcha/api/siteverify”; $data = [‘secret’ => ‘[YOUR … Read more

Google reCaptcha response “Uncaught (in promise) null”

Turns out it also occurs when a site is not “registered” in the Google recaptcha/admin Domains area. Solution: Add the domain in the recaptcha admin area: Sign into your Google account where your recaptcha keys are registered Type into Google “google recpatcha admin console” Go to your settings for your (production) key In “Domains”, add … Read more

ReCaptcha 2.0: enable Submit button on callback if recaptcha successful

i did the same thing on my test site. however, i used a button instead of submit, so here: you must add the property data-callback=”enableBtn” data-callback property executes the function specified after accomplishment of recaptcha. <div class=”g-recaptcha” data-sitekey=”############-#####” data-callback=”enableBtn”></div> and set the id of the button to whatever id you want to and set it … Read more

How to check in js that user has checked the checkbox in Google recaptcha?

Google has a call back option for when the checkbox is checked. Add this to your form element: data-callback=”XXX” Example: <div class=”g-recaptcha” data-callback=”recaptchaCallback” data-sitekey=”== xxxxxx ==”></div> And a disable attribute to your submit button. Example: <button id=”submitBtn” disabled>Submit</button> Then a create a callback function and write whatever code you need. Example: function recaptchaCallback() { $(‘#submitBtn’).removeAttr(‘disabled’); … Read more

Google Recaptcha v3 example demo

Simple code to implement ReCaptcha v3 The basic JS code <script src=”https://www.google.com/recaptcha/api.js?render=your reCAPTCHA site key here”></script> <script> grecaptcha.ready(function() { // do request for recaptcha token // response is promise with passed token grecaptcha.execute(‘your reCAPTCHA site key here’, {action:’validate_captcha’}) .then(function(token) { // add token value to form document.getElementById(‘g-recaptcha-response’).value = token; }); }); </script> The basic HTML … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)