reCAPTCHA v3: Check the Action, Score and Token on Your Server
For a site you operate, a reCAPTCHA v3 token is an input to a server-side decision. Verify it promptly, check the expected action and choose an appropriate response to the returned score.
Generate the token for the intended action
Google's v3 documentation explains action names and recommends running the check when the user takes the protected action. Tokens expire after two minutes, so a token acquired at page load may be stale when a visitor finally submits a long form. Action names are intended to describe operations such as registration; don't make them user-specific.
Verify on the server
The browser sends its response token to your backend, which verifies it with the provider using the secret key. The verification documentation says a response token can be verified once and expires after two minutes. Keep the secret out of browser code, logs and client-side bundles. Handle a missing token or a failed provider request as an explicit failure rather than silently treating it as a pass.
For v3, inspect the returned success field, action and score against your expected operation. Check the reported hostname as part of your site's configuration and review errors. Don't treat a score from a different action as evidence about the current action. Google's examples use a threshold to illustrate a decision, but the threshold appropriate to your own site depends on your traffic and risk tolerance.
Choose a proportional response
A low score isn't proof that a visitor is malicious. Depending on the operation, an application might request an additional verification step, defer a sensitive action or route a submission for review. Record the decision and provider error category without retaining the token or sensitive form content in general logs.
Test successful, expired, reused and unavailable-provider cases in a controlled environment using the provider's current testing guidance. Test failure behavior before relying on the check for an important workflow. If you don't administer a protected site, obtain access through its owner rather than attempting to defeat its verification.
Example: verification request and decision
POST https://www.google.com/recaptcha/api/siteverify
Content-Type: application/x-www-form-urlencoded
secret=<SERVER_SECRET>&response=<CLIENT_TOKEN>
The fields shown are placeholders. After verification, compare success, hostname and action with the intended site and operation before applying your own score policy. For example, a successful response with action login must not be accepted as evidence for signup. A reused or expired token returns a verification error and needs a new token.
If you need help planning an authorized automation workflow, ask for a scoped assessment. Share the documented limits and a redacted example, without credentials or private data.