当我尝试检查正确性时,Google RECAPTCHA总是在响应中返回错误 - 输入 - 响应。对服务的调用如何转到URL https://www.google.com/recaptcha/api/siteverify?
答案 0 :(得分:1)
格式为: HTTPS:// ... / API / siteverify秘密= [...]&安培;响应= [...]&安培; remote_ip = [...]
答案 1 :(得分:1)
确保Content-Type
设置为application/x-www-form-urlencoded
.Net
示例
using (HttpClient httpClient = new HttpClient())
{
var response = await httpClient.PostAsync(GoogleVerificationUrl + "?secret=" + ReCaptchaSecretKey + "&response=" + ReCaptchaResponse, new StringContent("", Encoding.UTF8, "application/x-www-form-urlencoded"));
}