Skip to content

To get reCAPTCHA keys from Google, follow these steps

Steps to Get reCAPTCHA v2/v3 Keys:

  1. Go to the reCAPTCHA Admin Console:
    👉 https://www.google.com/recaptcha/admin
    (Sign in with your Google account if prompted.)
  2. Register a New Site:
    • Click “+” (Create) or “Register a new site”.
    • Fill in the required details:
      • Label: A name for your site (e.g., “My Website”).
      • reCAPTCHA type: Choose between:
        • reCAPTCHA v2 (“I’m not a robot” Checkbox or Invisible reCAPTCHA)
        • reCAPTCHA v3 (Returns a score, no user interaction)
      • Domains: Add your website domain (e.g., example.com).
        (For testing, you can use localhost or 127.0.0.1 if working locally.)
    • Accept the reCAPTCHA Terms of Service.
    • Click Submit.
  3. Get Your Keys:
    • After submission, you’ll see:
      • Site Key (Public key, used in your HTML/JS)
      • Secret Key (Private key, used for server-side verification)
    • Copy both keys and store them securely.

Important Notes:

  • Keep Secret Key Private: Never expose it in client-side code.
  • Restrict Keys (Optional): In the admin panel, you can restrict keys to specific domains/IPs.
  • Testing Locally: Use localhost as a domain if testing on your PC.

Where to Use the Keys?

  • Frontend (HTML/JS): Include the Site Key in your reCAPTCHA widget.
  • Backend (PHP/Node.js/Python/etc.): Use the Secret Key to verify user responses.

Leave a Reply

Discover more from Sowft | Transforming Ideas into Digital Success

Subscribe now to keep reading and get access to the full archive.

Continue reading