reCAPTCHA with node.js and express reCAPTCHA with node.js and express express express

reCAPTCHA with node.js and express


I know it's been a long time since the question, but, for future references, here's the solution.

The problem is with the body key:

  body: {    secret: RECAPTCHA_SECRET,    response: req.body['g-recaptcha-response']  },

When using request-promise module and recaptcha, you should use the form key instead.

  form: {    secret: RECAPTCHA_SECRET,    response: req.body['g-recaptcha-response']  },

Reference: https://github.com/request/request-promise#post-like-html-forms-do