title: Value returned by grecaptcha.render rejected as invalid
body: <p>I'm trying to put a Google "I'm not a robot" captcha on my page using explicit rendering and AJAX.</p>
  
  <p>Here's my recaptcha onload callback:</p>
  
  <pre><code>function recaptchaLoaded() {
     elem.dataset.ffRecaptchaId = grecaptcha.render(elem, {
          'sitekey' : 'my key'
      });
  }
  </code></pre>
  
  <p>I see the element on the page, so that call claerly succeeds.</p>
  
  <p>Later on, I do this:</p>
  
  <pre><code>recaptcha_response = grecaptcha.getResponse(recaptcha_element.data('ff-recaptcha-id'));
  </code></pre>
  
  <p>This yield the error:</p>
  
  <blockquote>
    <p>Uncaught Error: Invalid ReCAPTCHA client id: 0</p>
  </blockquote>
  
  <p>I have checked with a debugger, and 0 is the value returned by render()</p>
  
  <p>What's the correct value to use here?</p>
  
  <p><strong>(Solution)</strong></p>
  
  <p>The problem was that I was accidentally importing the Recaptcha script twice, thus <code>grecaptcha</code> was being re-initialized after rendering the element on the page. Then the second grecaptcha obviously didn't know about the first element.</p>