Search code examples
recaptchacaptchainvisible-recaptcha

Enterprise reCaptcha score is always 0. for invisible reCaptcha


I've recently integrated enterprise reCaptcha to my application.

So, I've integrated both invisible and checkbox reCaptcha (works like fail-safe). In case user gets a low score in invisible captcha then they'll be shown the checkbox one.

The problem is that I'm always getting a score of 0 for invisible reCaptcha. And also reasons array is also empty in response, so I'm assuming that there's no validation error or something.

Is it something wrong that I'm doing or this is the expected behavior since there's not much traffic to site yet (it's still in localhost).

Any help is really appreciated. Thanks :)


Solution

  • To me it happened 'cause I was not passing the parameters correctly. Silly mistake :p

    Here's a sample of it.

    data : {
          "event": {
            "token": token,
            "siteKey": siteKey,
            "expectedAction": action
          }
        }