title: invalid-input-secret for google's recaptcha api
body: <p>I'm trying to use recaptcha on my website. Nodejs server with express framework. The site isn't being hosted, I'm still working on it locally. On the homepage, after the user enters his info to create an account, and solves the recaptcha, I send the results </p>
  
  <pre><code>$("#g-recaptcha-response").val()
  </code></pre>
  
  <p>to the server. And on my server, </p>
  
  <pre><code>https.get("https://www.google.com/recaptcha/api/siteverify?secret=" + SECRET + "&amp;response=" + key, function(res) {
              var data = "";
              res.on('data', function (chunk) {
                      data += chunk.toString();
              });
              res.on('end', function() {
                      try {
                              var parsedData = JSON.parse(data);
                              console.log(parsedData);
                              callback(parsedData.success);
                      } catch (e) {
                              callback(false);
                      }
              });
      });
  </code></pre>
  
  <p>where key is the response and SECRET is the secret key they give you. I declared
  a variable SECRET and stored the secret key as a string in it. </p>
  
  <p>Every single time, the for the </p>
  
  <pre><code>console.log(parsedData); 
  </code></pre>
  
  <p>It's saying </p>
  
  <pre><code>{ success: false, 'error-codes': [ 'invalid-input-secret' ] }
  </code></pre>
  
  <p>I copied and pasted the secret key, how could it be invalid. It's only supposed to show this error if "The secret parameter is invalid or malformed" as it says on their <a href="https://developers.google.com/recaptcha/docs/verify" rel="nofollow">website</a>. I followed this <a href="https://jaxbot.me/articles/new-nocaptcha-recaptcha-with-node-js-express-12-9-2014" rel="nofollow">tutorial</a>.</p>