title: reCAPTCHA with node.js and express
body: <p>Building an app with node.js and express and want to implement reCAPTCHA.
  My code is the following:</p>
  
  <pre><code>const app = require('express')();
  const bodyParser = require('body-parser');
  var request = require('request-promise');
  app.use(bodyParser.urlencoded({ extended: false }))
  
  
  app.post('/jow', (req, res, next) =&gt; {
  
    console.log(req.body['g-recaptcha-response']);
  
    var options = {
      method: 'POST',
      uri: 'https://www.google.com/recaptcha/api/siteverify',
      body: {
        secret: '6LcAuUoUAAAAAH-uiWl9cz0Wicg7iUsDxHImrgLO',
        response: req.body['g-recaptcha-response'],
      },
      json: true // Automatically stringifies the body to JSON
    };
  
    request(options)
      .then((response) =&gt; {
        console.log(response);
      })
      .catch((err) =&gt; {
        console.log('error');
      })
  
  });
  </code></pre>
  
  <p>I get the following output when I verify the CAPTCHA and send the form:</p>
  
  <p><a href="https://i.stack.imgur.com/tIcZ3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tIcZ3.png" alt="enter image description here"></a></p>
  
  <p>The errors state that I have a missing input response (while I have the token as we can see logged out) and a missing input secret. This indicates that something went wrong in the http request send using the <code>request-promise</code> package. What am I doing wrong here?</p>