Vladimir Despotovic
Vladimir Despotovic

Reputation: 3498

Google RECAPTCHA always returning error missing-input-response in the response

Google RECAPTCHA always returning error missing-input-response in the response when I try to check the correctness. How does the call to the service go, to the URL https://www.google.com/recaptcha/api/siteverify ?

Upvotes: 0

Views: 1174

Answers (2)

Sparrow_ua
Sparrow_ua

Reputation: 704

Make sure that Content-Type is set to application/x-www-form-urlencoded

.Net example

using (HttpClient httpClient = new HttpClient())
{
var response = await httpClient.PostAsync(GoogleVerificationUrl + "?secret=" + ReCaptchaSecretKey + "&response=" + ReCaptchaResponse, new StringContent("", Encoding.UTF8, "application/x-www-form-urlencoded"));                                        
}

Upvotes: 1

ajabdelaziz
ajabdelaziz

Reputation: 132

The format is: https://…/api/siteverify?secret=[…]&response=[…]&remote_ip=[…]

Upvotes: 1

Related Questions