reCAPTCHA Assessment
This page executes Google reCAPTCHA Enterprise in the browser to generate a token. Click the button to send the verification token to your assessment endpoint.
Documentation
How reCAPTCHA Assessment Works
-
Dynamic Script Injection: The page dynamically injects the Google Cloud reCAPTCHA Enterprise script (
https://www.google.com/recaptcha/enterprise.js?render=...) using the site key you provide, the first time you click the button. -
Local Storage: Your Endpoint URL and Site Key are remembered in
window.localStoragefor convenient re-testing. They stay in this browser, for this site, until you clear them. -
Assessment API: When submitted, the token is POSTed, as
{"recaptcha_token": "..."}, to the endpoint URL you provide. That endpoint, which could be a Cloud Run service, an Apigee proxy, or anything else, calls the reCAPTCHA Enterprise API to create an assessment, and returns the score and reason codes. - Your Own Endpoint: The fields default to a shared demo endpoint and its site key. That endpoint allows only a small number of assessments per day, after which it returns an error until the next day. To run your own, the example-recaptcha-assessment-service repo has a sample service, with scripts to create a key and deploy the service to Cloud Run in your own Google Cloud project.
-
Reason Codes: In addition to a score from
0.0to1.0, Enterprise assessments can return granular reasons such asAUTOMATIONorUNEXPECTED_ENVIRONMENT.