You need to sign in to do that
Don't have an account?
Bhargav vaishnav 2
ERROR for site owner: Invalid site key
Hello, I try integration Google reCaptcha with visulforce page but I got an error like ERROR for site owner: Invalid site key so how to short out it,
Here I attached my code as well
Thanks in advance to help me,
<apex:page showheader="false" controller="reCAPTCHA2_Controller">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" media="screen"/>
<div class="jumborton">
<apex:pageBlock >
<apex:pageMessages />
<apex:form >
<apex:pageBlockSection columns="1" collapsible="true" title="Create Contact useing reCaptcha">
<apex:pageBlockSectionItem >
<apex:outputLabel for="inputName" value="First Name"/>
<apex:inputText value="{!myfName}" id="inputName"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel for="inputName" value="Last Name"/>
<apex:inputText value="{!mylName}" id="inputName"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel for="inputEmail" value="Email"/>
<apex:inputText value="{!myEmail}" id="inputEmail"/>
</apex:pageBlockSectionItem>
<div class="g-recaptcha" data-sitekey="6LcgmLgUAAAAAACGKfUu-S2X4B17OZlXR12u9k9A"></div>
<script src="https://www.google.com/recaptcha/api.js"></script>
<br/>
<apex:commandButton value="Create Contact" action="{!doVerify}"/>
</apex:pageBlockSection>
</apex:form>
</apex:pageBlock>
</div>
</apex:page>
Here I attached my code as well
Thanks in advance to help me,
<apex:page showheader="false" controller="reCAPTCHA2_Controller">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" media="screen"/>
<div class="jumborton">
<apex:pageBlock >
<apex:pageMessages />
<apex:form >
<apex:pageBlockSection columns="1" collapsible="true" title="Create Contact useing reCaptcha">
<apex:pageBlockSectionItem >
<apex:outputLabel for="inputName" value="First Name"/>
<apex:inputText value="{!myfName}" id="inputName"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel for="inputName" value="Last Name"/>
<apex:inputText value="{!mylName}" id="inputName"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel for="inputEmail" value="Email"/>
<apex:inputText value="{!myEmail}" id="inputEmail"/>
</apex:pageBlockSectionItem>
<div class="g-recaptcha" data-sitekey="6LcgmLgUAAAAAACGKfUu-S2X4B17OZlXR12u9k9A"></div>
<script src="https://www.google.com/recaptcha/api.js"></script>
<br/>
<apex:commandButton value="Create Contact" action="{!doVerify}"/>
</apex:pageBlockSection>
</apex:form>
</apex:pageBlock>
</div>
</apex:page>
Greetings to you!
You need to ensure your site is added in the domains section of the google reCAPTCHA page where you generated the API key.
Please refer to the below links which might help you further with the above issue.
https://stackoverflow.com/questions/48600034/recaptchaerror-for-site-owner-invalid-site-key
https://stackoverflow.com/questions/30735694/recaptcha-error-invalid-domain-for-site-key
https://stackoverflow.com/questions/44631918/error-for-site-owner-invalid-site-key
https://wordpress.org/support/topic/recaptcha-error-error-for-site-owner-invalid-site-key/
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
You need to ensure your site is added in the domains section of the google reCAPTCHA page where you generated the API key.
Please refer to the below links which might help you further with the above issue.
https://stackoverflow.com/questions/48600034/recaptchaerror-for-site-owner-invalid-site-key
https://stackoverflow.com/questions/30735694/recaptcha-error-invalid-domain-for-site-key
https://stackoverflow.com/questions/44631918/error-for-site-owner-invalid-site-key
https://wordpress.org/support/topic/recaptcha-error-error-for-site-owner-invalid-site-key/
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Thanks
-Bhargav