Reputation: 31
I'm trying to convert a v2 recaptcha flow to use the enterprise version. What is the equivalent to the server side call to https://www.google.com/recaptcha/api/siteverify
?
If I try to send the same or similar POST request to https://recaptchaenterprise.googleapis.com
or https://recaptchaenterprise.googleapis.com/<project path>
, I get a 404 back.
There does not appear to be a matching v1 or v1beta1 endpoint for siteverify -- at least not that I've found in any of the docs or in the official recaptcha node.js library. What am I missing here?
Upvotes: 2
Views: 1779
Reputation: 1
Probably you have found a solution by now. But for those still looking
if you configure your request like this you'll get what you want:
https://www.google.com/recaptcha/api/siteverify?secret=${recaptchaSecretKey}&response=${recaptchaToken}
;
where secret is 'The shared key between your site and reCAPTCHA.' And response is 'The user response token provided by the reCAPTCHA client-side integration on your site.'.
Upvotes: 0
Reputation: 31
There is no direct equivalent to the previously recommended verification call in the enterprise version (the call to https://www.google.com/recaptcha/api/siteverify
).
If you want to mimic this server side verification flow, you must create a new assessment for the checkbox token and make a judgement based on that score yourself.
Upvotes: 1