0

I'm trying to add in my site a reCaptcha, I have a key already but when i add in the div it returns an error.

div vc-recaptcha theme="'light'" key="'key-number-here'"

In the recaptcha shows that: ERROR for site owner: Invalid key type

I'm trying to use in localhost and I already register in here: https://www.google.com/recaptcha

2
  • Do you really need to add single quotes around your attribute value ? Commented May 23, 2019 at 14:52
  • You should search before asking any question by the way check (Recaptcha in Angular JS) Commented May 24, 2019 at 8:50

1 Answer 1

1

make sure you add localhost (with port number if you are using) in your domain settings and you dont need extra quotes in the key

  <div class="g-recaptcha" data-sitekey="your_site_key"></div>

and make sure you import the following library in your html code

 <script src="https://www.google.com/recaptcha/api.js" async defer></script>
Sign up to request clarification or add additional context in comments.

2 Comments

how can I add localhost with port? when I try add localhost:52360 as new domain, this error has shown to me: ""The following domains are invalid: localhost:52360. A valid domain requires a host and must not include any protocol, path, port, query or fragment""
localhost domains are no longer supported by default developers.google.com/recaptcha/docs/faq#localhost_support

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.