×
1 Choose EITC/EITCA Certificates
2 Learn and take online exams
3 Get your IT skills certified

Confirm your IT skills and competencies under the European IT Certification framework from anywhere in the world fully online.

EITCA Academy

Digital skills attestation standard by the European IT Certification Institute aiming to support Digital Society development

LOG IN TO YOUR ACCOUNT

CREATE AN ACCOUNT FORGOT YOUR PASSWORD?

FORGOT YOUR PASSWORD?

AAH, WAIT, I REMEMBER NOW!

CREATE AN ACCOUNT

ALREADY HAVE AN ACCOUNT?
EUROPEAN INFORMATION TECHNOLOGIES CERTIFICATION ACADEMY - ATTESTING YOUR PROFESSIONAL DIGITAL SKILLS
  • SIGN UP
  • LOGIN
  • INFO

EITCA Academy

EITCA Academy

The European Information Technologies Certification Institute - EITCI ASBL

Certification Provider

EITCI Institute ASBL

Brussels, European Union

Governing European IT Certification (EITC) framework in support of the IT professionalism and Digital Society

  • CERTIFICATES
    • EITCA ACADEMIES
      • EITCA ACADEMIES CATALOGUE<
      • EITCA/CG COMPUTER GRAPHICS
      • EITCA/IS INFORMATION SECURITY
      • EITCA/BI BUSINESS INFORMATION
      • EITCA/KC KEY COMPETENCIES
      • EITCA/EG E-GOVERNMENT
      • EITCA/WD WEB DEVELOPMENT
      • EITCA/AI ARTIFICIAL INTELLIGENCE
    • EITC CERTIFICATES
      • EITC CERTIFICATES CATALOGUE<
      • COMPUTER GRAPHICS CERTIFICATES
      • WEB DESIGN CERTIFICATES
      • 3D DESIGN CERTIFICATES
      • OFFICE IT CERTIFICATES
      • BITCOIN BLOCKCHAIN CERTIFICATE
      • WORDPRESS CERTIFICATE
      • CLOUD PLATFORM CERTIFICATENEW
    • EITC CERTIFICATES
      • INTERNET CERTIFICATES
      • CRYPTOGRAPHY CERTIFICATES
      • BUSINESS IT CERTIFICATES
      • TELEWORK CERTIFICATES
      • PROGRAMMING CERTIFICATES
      • DIGITAL PORTRAIT CERTIFICATE
      • WEB DEVELOPMENT CERTIFICATES
      • DEEP LEARNING CERTIFICATESNEW
    • CERTIFICATES FOR
      • EU PUBLIC ADMINISTRATION
      • TEACHERS AND EDUCATORS
      • IT SECURITY PROFESSIONALS
      • GRAPHICS DESIGNERS & ARTISTS
      • BUSINESSMEN AND MANAGERS
      • BLOCKCHAIN DEVELOPERS
      • WEB DEVELOPERS
      • CLOUD AI EXPERTSNEW
  • FEATURED
  • SUBSIDY
  • HOW IT WORKS
  •   IT ID
  • ABOUT
  • CONTACT
  • MY ORDER
    Your current order is empty.
EITCIINSTITUTE
CERTIFIED

What is the process for obtaining the site key and secret key necessary for reCAPTCHA validation?

by EITCA Academy / Monday, 19 August 2024 / Published in Web Development, EITC/WD/WFCE Webflow CMS and eCommerce, Site building, Contact page: reCAPTCHA setup, Examination review

To integrate reCAPTCHA into your Webflow CMS and eCommerce site, particularly for a contact page, you must first obtain the necessary site key and secret key from Google reCAPTCHA. These keys are essential for the validation process, ensuring that the interactions on your site are performed by humans and not by automated bots. The following steps provide a detailed guide on how to acquire these keys and integrate them into your Webflow project.

Step-by-Step Process for Obtaining the reCAPTCHA Keys

1. Access the Google reCAPTCHA Admin Console:
– Navigate to the [Google reCAPTCHA website](https://www.google.com/recaptcha).
– Click on the "Admin Console" button, which will redirect you to the login page. If you do not have a Google account, you will need to create one.

2. Register Your Site:
– Once logged in, you will be presented with the reCAPTCHA admin console.
– Click on the "plus" icon or the "Create" button to register a new site.
– You will be prompted to fill out a form with the following fields:
– Label: This is a descriptive name for your site, which can help you identify it later. For example, "Webflow Contact Page".
– reCAPTCHA Type: Choose between reCAPTCHA v2 or reCAPTCHA v3. reCAPTCHA v2 provides a checkbox or an invisible reCAPTCHA badge, while reCAPTCHA v3 runs in the background and assigns scores based on user interactions.
– Domains: Enter the domain names where you plan to use reCAPTCHA. For instance, if your site is "example.com", you would enter "example.com". You can add multiple domains if necessary.
– Owners: This field defaults to the email address of the logged-in user. You can add additional owners if others need access to the reCAPTCHA settings.
– Accept the reCAPTCHA Terms of Service: Check the box to agree to the terms.

3. Obtain the Site Key and Secret Key:
– After submitting the registration form, you will be provided with a site key and a secret key.
– The site key is used in your HTML code to render the reCAPTCHA widget.
– The secret key is used in server-side requests to verify the user's response.

Integrating reCAPTCHA with Webflow

Once you have obtained the site key and secret key, you can integrate reCAPTCHA into your Webflow project. Here is how you can do it:

1. Add reCAPTCHA to Your Webflow Form:
– Open your Webflow project and navigate to the page where your form is located.
– Add an HTML Embed element to your form. You can find the HTML Embed element in the Webflow Designer under the "Add Elements" panel.
– In the HTML Embed code editor, insert the following code snippet:

html
     <div class="g-recaptcha" data-sitekey="YOUR_SITE_KEY"></div>
     <script src="https://www.google.com/recaptcha/api.js" async defer></script>
     

– Replace `YOUR_SITE_KEY` with the site key you obtained from the reCAPTCHA admin console.

2. Set Up Server-Side Validation:
– To validate the reCAPTCHA response on your server, you need to make a POST request to the Google reCAPTCHA API. Here is an example using PHP:

php
     <?php
     if ($_SERVER['REQUEST_METHOD'] === 'POST') {
         $recaptcha_secret = 'YOUR_SECRET_KEY';
         $recaptcha_response = $_POST['g-recaptcha-response'];
         
         $response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=$recaptcha_secret&response=$recaptcha_response");
         $response_keys = json_decode($response, true);
         
         if (intval($response_keys["success"]) !== 1) {
             echo 'Please complete the reCAPTCHA';
         } else {
             echo 'Thank you for your submission';
         }
     }
     ?>
     

– Replace `YOUR_SECRET_KEY` with the secret key you obtained from the reCAPTCHA admin console.
– This script verifies the user's response with Google reCAPTCHA and checks if the validation was successful.

3. Testing and Troubleshooting:
– After integrating reCAPTCHA into your form, it is important to test it thoroughly. Submit the form to ensure that the reCAPTCHA widget appears and functions correctly.
– Check the server-side validation to confirm that the reCAPTCHA responses are being verified properly.
– If you encounter any issues, refer to the [Google reCAPTCHA documentation](https://developers.google.com/recaptcha) for troubleshooting tips and additional configuration options.

Example Scenario

Consider a scenario where you have a contact form on your Webflow site, and you want to protect it from spam submissions using reCAPTCHA v2. Here is a detailed example of how you would set this up:

1. Register Your Site:
– Label: "Webflow Contact Form"
– reCAPTCHA Type: "reCAPTCHA v2"
– Domains: "example.com"

2. Integrate reCAPTCHA into Webflow:
– Add an HTML Embed element to your contact form in the Webflow Designer.
– Insert the following code snippet into the HTML Embed code editor:

html
     <div class="g-recaptcha" data-sitekey="6Lc_aX0UAAAAAB4aX0UAAAAAB4aX0UAAAAAB4aX0UAAAA"></div>
     <script src="https://www.google.com/recaptcha/api.js" async defer></script>
     

– Replace `6Lc_aX0UAAAAAB4aX0UAAAAAB4aX0UAAAAAB4aX0UAAAA` with your actual site key.

3. Set Up Server-Side Validation:
– Use the following PHP script to validate the reCAPTCHA response:

php
     <?php
     if ($_SERVER['REQUEST_METHOD'] === 'POST') {
         $recaptcha_secret = '6Lc_aX0UAAAAAB4aX0UAAAAAB4aX0UAAAAAB4aX0UAAAA';
         $recaptcha_response = $_POST['g-recaptcha-response'];
         
         $response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=$recaptcha_secret&response=$recaptcha_response");
         $response_keys = json_decode($response, true);
         
         if (intval($response_keys["success"]) !== 1) {
             echo 'Please complete the reCAPTCHA';
         } else {
             echo 'Thank you for your submission';
         }
     }
     ?>
     

– Replace `6Lc_aX0UAAAAAB4aX0UAAAAAB4aX0UAAAAAB4aX0UAAAA` with your actual secret key.

By following these steps, you can effectively integrate reCAPTCHA into your Webflow contact form, enhancing its security and protecting it from spam and automated submissions. It is important to keep your secret key confidential and not expose it in client-side code or public repositories.

Other recent questions and answers regarding Contact page: reCAPTCHA setup:

  • How does enabling reCAPTCHA validation in the Webflow CMS contact form reduce spam submissions?
  • Why is it important to include both the primary domain and staging domains when registering a site for reCAPTCHA?
  • How can the "From Name" and "Subject Line" be configured in the form settings of a Webflow CMS project?
  • What are the steps to access the project settings in Webflow CMS for reCAPTCHA configuration?

More questions and answers:

  • Field: Web Development
  • Programme: EITC/WD/WFCE Webflow CMS and eCommerce (go to the certification programme)
  • Lesson: Site building (go to related lesson)
  • Topic: Contact page: reCAPTCHA setup (go to related topic)
  • Examination review
Tagged under: Form Validation, Google API, ReCAPTCHA, Security, Web Development, Webflow
Home » Web Development » EITC/WD/WFCE Webflow CMS and eCommerce » Site building » Contact page: reCAPTCHA setup » Examination review » » What is the process for obtaining the site key and secret key necessary for reCAPTCHA validation?

Certification Center

USER MENU

  • My Account

CERTIFICATE CATEGORY

  • EITC Certification (105)
  • EITCA Certification (9)

What are you looking for?

  • Introduction
  • How it works?
  • EITCA Academies
  • EITCI DSJC Subsidy
  • Full EITC catalogue
  • Your order
  • Featured
  •   IT ID
  • EITCA reviews (Medium publ.)
  • About
  • Contact

EITCA Academy is a part of the European IT Certification framework

The European IT Certification framework has been established in 2008 as a Europe based and vendor independent standard in widely accessible online certification of digital skills and competencies in many areas of professional digital specializations. The EITC framework is governed by the European IT Certification Institute (EITCI), a non-profit certification authority supporting information society growth and bridging the digital skills gap in the EU.

Eligibility for EITCA Academy 90% EITCI DSJC Subsidy support

90% of EITCA Academy fees subsidized in enrolment by

    EITCA Academy Secretary Office

    European IT Certification Institute ASBL
    Brussels, Belgium, European Union

    EITC / EITCA Certification Framework Operator
    Governing European IT Certification Standard
    Access contact form or call +32 25887351

    Follow EITCI on X
    Visit EITCA Academy on Facebook
    Engage with EITCA Academy on LinkedIn
    Check out EITCI and EITCA videos on YouTube

    Funded by the European Union

    Funded by the European Regional Development Fund (ERDF) and the European Social Fund (ESF) in series of projects since 2007, currently governed by the European IT Certification Institute (EITCI) since 2008

    Information Security Policy | DSRRM and GDPR Policy | Data Protection Policy | Record of Processing Activities | HSE Policy | Anti-Corruption Policy | Modern Slavery Policy

    Automatically translate to your language

    Terms and Conditions | Privacy Policy
    EITCA Academy
    • EITCA Academy on social media
    EITCA Academy


    © 2008-2026  European IT Certification Institute
    Brussels, Belgium, European Union

    TOP
    CHAT WITH SUPPORT
    Do you have any questions?
    We will reply here and by email. Your conversation is tracked with a support token.