'Google recaptcha Enterprise returns zero for risk analysis score
I'm using Google recaptcha enterprise in my app. According to the docs for interpreting an assessment. Four score levels are available by default: 0.1, 0.3, 0.7, 0.9. I have not contacted google's sales team to receive more granular score levels. In my app I'm seeing most requests coming in with a value of 0.9, as well as some with 0.7, 0.3, and 0.1. However, I'm also seeing some scores coming in with a value of 0.0. How can this happen?
Solution 1:[1]
If nobody on your project has requested more granular scores for reCaptcha and you are receiving assessments with 0.0 ratings, it may indicate an issue with the reCaptcha itself.
You can report this using Public Issue Tracker.
Solution 2:[2]
For your case, firstly the expected content type should be json:
"Content-Type": "application/json; charset=utf-8"
If changing the above doesn't resolve the issue, then try to change the post data from object/dict/json to string too.
tips: in general, when we can't get expected response in our code, we can try experimenting the target request in straight forward tool like curl or jmeter to figure out what's wrong, then replicate the solution back into our code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Declan Lawton |
