Hi,
I m using V2.0 of reCAPTCHA. Following is my back end code in Node.js to POST "secret" and "response" to google service.
var request = require('request');
data: {
secret: reCaptchaKey,
response: req.body['g-recaptcha-response']
}
}, function(error, response, body){
console.log('body: '+body.success);
});
But I received error code: "missing-input-secret" and "missing-input-response".
I also tried
json: true,
body: {
secret: reCaptchaKey,
response: req.body['g-recaptcha-response']
}
}, function(error, response, body){
// console.log(response);
console.log('body: '+body.success+', '+body[error-codes].toString());
});
and got the same error code.
I then tried V1.0 of reCAPTCHA which uses GET method, and it works!
So, could anyone please help how I should send "secret" and "response" in my Node.js code for V2.0 of reCAPTCHA?
Thanks in advance
Jack