Client error: bad request. Error 400. NoCaptcha Laravel Anhskohbo

时间:2019-05-19 04:10:39

标签: php laravel recaptcha

I connect the re-captcha to the site, which is built on Laravel. And when you click on "I am not a robot", and then on "registration", this error appears.

In the past, I connected the re-captcha on the framework yii2. I had no such problems with exceptions. Now I Installed captcha - Anhskohbo NoCaptcha.

The error itself looks like a notification:

Client error: POST https://www.google.com/recaptcha/api/siteverify resulted in a 400 Bad Request response:
{
  "success": false,
  "error-codes": [
    "bad-request"
  ]
}

Screenshot

1 个答案:

答案 0 :(得分:0)

根据Google reCAPTCHA documentation,当请求格式错误时会出现此错误。您可以检查将哪些值传递给/ siteverify端点吗?首先想到的是,根据this response,到Google端点的请求的Content-Type:标头应为application/x-www-form-urlencoded-根据我的经验,也是这样。