2

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?

Wojtek_B
  • 4,245
  • 1
  • 7
  • 21
j s
  • 31
  • 4
  • For reference, this is the server side pattern we are following for v2 https://developers.google.com/recaptcha/docs/verify – j s Jul 27 '21 at 05:23
  • I'd recommend you to file issue on Google's [IssueTracker](https://issuetracker.google.com) if you're not able to find enough guidance at the official documentation or if some features doesn't work as you expected. – Wojtek_B Jul 27 '21 at 15:05
  • Got an answer at length from google support, but never heard anything via that issue tracker Wojtek. I appreciate the attempted help? – j s Aug 23 '21 at 21:02

2 Answers2

1

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.

j s
  • 31
  • 4
0

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.'.