Skip to content

Quick Start Guide

Integrate EU CAPTCHA into your website in three steps.

Prerequisites

Using React, Vue, Angular, or another SPA framework? Skip the steps below. Use the dedicated framework packages instead — see SPA Framework Integration.

Building a native Android app? Skip the steps below. Use the Android SDK instead.

Building a native iOS app? Skip the steps below. Use the iOS SDK instead.

Building a Flutter app? Skip the steps below. Use the Flutter integration instead.

Step 1 — Add the script to your page

Add the EU CAPTCHA JavaScript snippet inside the <head> element of every page where you want to protect a form:

<head>
  <!-- EU CAPTCHA -->
  <script src="https://cdn.eu-captcha.eu/verify.js" async defer></script>
</head>

The script is lightweight and loads asynchronously — it does not block page rendering.

Step 2 — Add the widget to your form

Place the EU CAPTCHA widget element inside your <form>, just before the submit button. Set your sitekey in the data-sitekey attribute:

<form action="/submit" method="POST">
  <!-- your existing form fields -->
  <input type="text" name="email" />
  <input type="password" name="password" />

  <!-- EU CAPTCHA widget -->
  <div class="eu-captcha" data-sitekey="EUCAPTCHA_SITE_KEY"></div>

  <button type="submit">Log in</button>
</form>

Replace EUCAPTCHA_SITE_KEY with the sitekey value from the dashboard.

The widget runs the challenge automatically when the page loads. On completion it injects a hidden <input name="eu-captcha-response"> into the form.

Step 3 — Verify the token on your server

When your server receives the form submission, validate the EU CAPTCHA token before processing the request. For code examples in PHP, Python, and Node.js and the full API reference, see Server-Side Verification. Official client libraries are also available for Python, PHP, Ruby, and Java.

Keep the secret key server-side only

Your secret key is found in the sitekey configuration in the dashboard. Never include it in frontend code, client-side JavaScript, or any file that is committed to a public repository.


Framework packages

Official npm packages are available for SPA frameworks:

Next steps