Title: Console Error &#8211; Invalid Site Key
Last modified: March 5, 2021

---

# Console Error – Invalid Site Key

 *  Resolved [aardi](https://wordpress.org/support/users/aardi/)
 * (@aardi)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/console-error-invalid-site-key/)
 * Hey!
    I’m using Contact Form 7 v5.4 and the newest version of your plugin on 
   my site. I’m loading the CF7-Form through a shortcode in my footer. For some 
   reason the ReCaptcha V2 works, but I get an Error in the console:
 *     ```
       Uncaught (in promise) Error: Invalid site key or not loaded in api.js: <API KEY>
           at Array.<anonymous> (recaptcha__en.js:174)
           at recaptcha__en.js:336
           at Object.wpcf7_recaptcha.execute (script.js:5)
           at wpcf7_recaptcha.execute_on_homepage (script.js:21)
       ```
   
 * Obviously it’s not good to leave the site key to be accessed via console, do 
   you perhaps know what causes the error?
 * I’ve followed the installation guide twice and checked that everything is setup
   correctly (as evident by the working ReCaptcha), just can’t figure out why it
   shows the error.
 * Thanks in advance,
    Dimi

Viewing 1 replies (of 1 total)

 *  Plugin Author [IQComputing](https://wordpress.org/support/users/iqcomputing/)
 * (@iqcomputing)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/console-error-invalid-site-key/#post-14139855)
 * Hello,
 * Luckily, that API key in your Javascript console is your Public Key. It’s going
   to be accessible in the source code of your website anyway. The only danger is
   if it’s also printing out the Secret Key too. Let’s run down a couple of things:
 * 1) Are you running the latest version of Contact Form 7 and this plugin (ReCaptcha
   v2 for Contact Form 7)?
 * 2) Have you cleared your browser’s cache? If you have any caching plugins installed,
   such as Autoptimize or WP Rock please clear those caches.
 * 3) If you have a caching plugin such as Autoptimize or WP Rocket could you add
   the following script to their exclusion list to not get concatenation.
 * Settings > Autoptimize > Exclude scripts from Autoptimize:
 * `wpcf7-recaptcha/assets/js/wpcf7-recaptcha-controls.js`
 * If you’ve tried the above and are still running into issues and are ok with publicly
   sharing your website link, please reply to this thread with a link to your website.
   You may also try to install the [WordPress Health Check & Troubleshooting plugin](https://wordpress.org/plugins/health-check/)
   to narrow down the root cause of your issue. It could be a plugin or theme conflict,
   and the above plugin will help safely disable plugins until you find the offender.
   Please review [their documentation](https://make.wordpress.org/support/handbook/appendix/troubleshooting-using-the-health-check/)
   for more information.
 * Hopefully, the above info helps you narrow down and solve your issue. If not,
   please reply to this thread with more information. Have a wonderful weekend!

Viewing 1 replies (of 1 total)

The topic ‘Console Error – Invalid Site Key’ is closed to new replies.

 * ![](https://ps.w.org/wpcf7-recaptcha/assets/icon.svg?rev=2003053)
 * [ReCaptcha v2 for Contact Form 7](https://wordpress.org/plugins/wpcf7-recaptcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpcf7-recaptcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpcf7-recaptcha/)
 * [Active Topics](https://wordpress.org/support/plugin/wpcf7-recaptcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpcf7-recaptcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpcf7-recaptcha/reviews/)

 * 1 reply
 * 6 participants
 * Last reply from: [IQComputing](https://wordpress.org/support/users/iqcomputing/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/console-error-invalid-site-key/#post-14139855)
 * Status: resolved