【问题标题】:Google RECAPTCHA always returning error missing-input-response in the responseGoogle RECAPTCHA 总是在响应中返回错误 missing-input-response
【发布时间】:2017-10-22 08:16:09
【问题描述】:

当我尝试检查正确性时,Google RECAPTCHA 总是在响应中返回错误缺失输入响应。对服务的调用如何转到 URL https://www.google.com/recaptcha/api/siteverify

【问题讨论】:

    标签: recaptcha


    【解决方案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"));                                        
    }
    

    【讨论】:

      【解决方案2】:

      格式为: https://…/api/siteverify?secret=[…]&response=[…]&remote_ip=[…]

      【讨论】:

        猜你喜欢
        • 2020-09-17
        • 1970-01-01
        • 2015-12-01
        • 1970-01-01
        • 2016-05-29
        • 1970-01-01
        • 2016-08-24
        • 1970-01-01
        • 2016-10-13
        相关资源
        最近更新 更多