<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?render=<reCAPTCHA_site_key>"></script>
...
<script>
grecaptcha.ready(function() {
grecaptcha.execute('<reCAPTCHA_site_key>')
.then(function(token) {
alert(token); -> the token is printed!
});
});
</script>
...
What is the best way to validate the token (server side) after the user submits the form?
In reCAPTCHA v2.0 the value of "g-recaptcha-response" are passed to website backend to validate the recaptcha.
Thanks
--
You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to recaptcha+...@googlegroups.com.
To post to this group, send email to reca...@googlegroups.com.
Visit this group at https://groups.google.com/group/recaptcha.
For more options, visit https://groups.google.com/d/optout.