Search code examples
recaptcharecaptcha-v3

Google Recaptcha V3 site verify does not return score property


I am trying to use Google's Recaptcha V3 to test whether the server side request is non robot. My Url request to Google is:

POST https://www.google.com/recaptcha/api/siteverify?secret=XXX&response=XXX

As I understand each response should be ranked a score between 0-1, but the response has only 3 properties.

{
    "success": true,
    "challenge_ts": "2023-06-11T15:57:32Z",
    "hostname": "testkey.google.com"
}

Am I missing any parameters?


Solution

  • According to the specific docs on reCAPTCHA verification, the score is not on the responses parameters.

    You probably read the response format on reCAPTCHA v3 docs, which says that the score is one of the params. This page of the docs contradicts the previously mentioned, so I think that the score field is not shown but someone forgot to update the docs on reCATPCHA v3 page.

    On the other hand, are you sure your site-key and secret-key belong to the v3 reCAPTCHA api? Because the version you use depends on the version of the key pair.