", "answerCount": 2, "upvoteCount": 0, "datePublished": "2019-09-16T10:29:13.000Z", "author": { "@type": "Person", "name": "Bhargav vaishnav", "url": "https://trailblazers.salesforce.com/profileView?u=0053A00000Ezxh1QAB", "affiliation": { "@type": "Organization", "name": "Shrumtech" } }, "acceptedAnswer": { "@type": "Answer", "text": "Hi Bhargav, 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", "upvoteCount": 1, "url": "https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T4PlfSAF", "datePublished": "2019-09-16T10:48:07.000Z", "author": { "@type": "Person", "name": "Khan Anas Rehmani", "url": "https://trailblazers.salesforce.com/profileView?u=0053A00000Dr2DiQAJ", "affiliation": { "@type": "Organization", "name": "Salesforce" } } }, "suggestedAnswer": [ { "@type": "Answer", "text": "Thanks, Khan Anas  your Those links were useful for me In a stackoverflow go though  one by one solution will definitely get an answer  Thanks  -Bhargav", "upvoteCount": 0, "url": "https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T4PlfSAF", "datePublished": "2019-09-17T07:16:38.000Z", "author": { "@type": "Person", "name": "Bhargav vaishnav", "url": "https://trailblazers.salesforce.com/profileView?u=0053A00000Ezxh1QAB", "affiliation": { "@type": "Organization", "name": "Shrumtech" } } } ] } } Skip to main content
Bhargav vaishnav (Shrumtech) 님이 #Visualforce에 질문했습니다
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>
답변 2개
  1. 2019년 9월 16일 오전 10:48
    Hi Bhargav,

    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
0/9000