Groovy
TrustCaptcha – Bot protection

Groovy CAPTCHA Integration

Protect your Groovy application’s forms and logins with TrustCaptcha’s bot protection. Our Groovy integration helps you verify each request and decide what to allow, block, or review. Privacy-first, EU-hosted and GDPR-compliant—no annoying image challenges.

Quickstart

How the integration works

1. Create a CAPTCHA

Create a user account or log in with an existing one. Then create a new CAPTCHA or select an existing one. If you’re unsure whether TrustCaptcha is right for you, try our CAPTCHA service risk-free for 14 days at no cost.

On the CAPTCHA overview page, you will find all the important information, such as the site key, secret key and licence key. Allow your websites to access your CAPTCHA by simply adding them to the access authorised domain list in the CAPTCHA security rules.

Start of the CAPTCHA creation form.
CAPTCHA security rules of a demo CAPTCHA.

2. Integrate the CAPTCHA widget into your frontend

Integrate the CAPTCHA widget into your website or app. For precise, detailed instructions, please read the CAPTCHA widget guide in our documentation.

Read the documentation

The CAPTCHA widget will then be displayed on your website or app:

CAPTCHA done

Prebuild frontend integrations
You can use one of our pre-built frontend integrations to integrate the CAPTCHA widget into your website or application. If there is no pre-built integration from us for your preferred frontend technology, your software developers can integrate the CAPTCHA themselves using using our documentation or ask our support-team for a pre-built integration solution.

Android
Angular
Craft CMS
Flutter
iOS
JavaScript
Joomla
Keycloak
Magento 2
React
React Native
TYPO3
Vue
Webflow
WordPress

3. Validate the CAPTCHA result in your backend

The following steps give you an idea of how to retrieve the CAPTCHA verification result from our server in a Groovy backend and determine how to proceed based on this result. For precise, detailed instructions, please read the CAPTCHA integration guide for Groovy in our documentation.

Read the documentation

First, install our TrustCaptcha Groovy dependency:

Maven Central
XML
<dependency>
  <groupId>com.trustcomponent</groupId>
  <artifactId>trustcaptcha</artifactId>
  <version>2.0.0</version>
</dependency>

Retrieve the verification result from our server using the verification token and the secret key of your CAPTCHA:

Fetch Result
Groovy
// Retrieving the verification result
VerificationResult verificationResult
try {
  verificationResult = CaptchaManager.getVerificationResult("<your_secret_key>", "<verification_token_from_your_client>")
} catch (CaptchaFailureException e) {
  // Fetch verification result failed - handle error
}

Based on the verification results and your individual needs, decide how you would like to proceed:

Handle Result
Groovy
// Act on the verification result
if (!verificationResult.isVerificationPassed() || verificationResult.getScore() > 0.5) {
  logger.warn("Verification failed or bot score > 0.5 – possible automated request.")
}

Need detailed information about the Groovy CAPTCHA integration?
For detailed instructions on integrating TrustCaptcha, please refer to our Groovy CAPTCHA integration guide. A complete integration example for the Groovy CAPTCHA can be found in our CAPTCHA Samples Repository on Github.

Other backend technology instead of Groovy?
If you do not want to use Groovy on your server or have several different backends, you can select a different integration here. If there is no pre-built integration from us for your preferred backend technology, your software developers can integrate the CAPTCHA verification process themselves using our documentation or ask our support-team for a pre-built integration.

.Net
Go
Groovy
Java
Kotlin
Nodejs
PHP
Python
Ruby
Rust
Scala
Spring

4. Congratulations 🎉

You are now protected by TrustCaptcha - congratulations!

CAPTCHA done

FAQs

What is a Groovy CAPTCHA?
A Groovy CAPTCHA is a human-verification widget built to run in JVM-based applications written with Groovy or frameworks such as Grails. It renders a small script in the browser, creates a signed token, and lets your Groovy backend verify that token before processing the request. Modern providers like TrustCaptcha add automatic proof-of-work and an AI-driven bot-score so legitimate visitors rarely see any challenge at all, while malicious scripts are throttled or blocked.
What is the best Groovy CAPTCHA?
The optimal Groovy CAPTCHA combines strong security, friction-free UX, GDPR compliance and SEO-friendly structured data. TrustCaptcha stands out because it layers dynamically scaled proof-of-work with a real-time bot-score and fine-grained security settings, outperforming pure proof-of-work tools that only slow bots down. Its EU hosting and ready-made data-processing agreements simplify GDPR obligations, and its built-in FAQPage JSON-LD keeps your help content eligible for rich results even after Google’s 2023 visibility change.
How does a Groovy CAPTCHA work?
In the browser the CAPTCHA script starts a short proof-of-work task, collects behaviour signals and returns a token when the user is likely human. Your Groovy or Grails backend then posts that token to the provider’s API; the API verifies the cryptographic puzzle and checks the bot-score, responding with pass or fail. Libraries and code samples for Maven, Gradle and plain Groovy make the verification call a one-liner, so implementation typically takes minutes.
Do I need a Groovy CAPTCHA?
If your Groovy application accepts forms, log-ins or search queries from the public internet, a CAPTCHA is still one of the most cost-effective ways to stop credential-stuffing, spam and scraping bots. AI research has already shown how common CAPTCHAs such as reCAPTCHA v3 can be bypassed with machine-learning mouse simulations, so relying on multi-layered defences is now essential. TrustCaptcha’s combined proof-of-work and behavioural scoring blocks automated attacks while staying invisible for real users, which protects conversion rates and page speed.
Is TrustCaptcha GDPR-compliant for EU deployments?
Yes. TrustCaptcha stores and processes all data exclusively within the EU, offers a data-processing agreement (DPA) you can sign online and supports a minimal-data mode that runs without cookies. Independent legal reviews highlight the privacy risks of U.S.-hosted CAPTCHA services, so using an EU-based alternative like TrustCaptcha mitigates cross-border transfer concerns and makes your compliance paperwork lighter.
Can I customize the look and feel of TrustCaptcha?
Absolutely – every visual element can be tweaked: 35+ languages, light, dark or auto themes, brand-colours, rounded corners, even a fully invisible mode. You can hide TrustCaptcha branding, add your own privacy-policy link or make the widget collapse until it’s needed. These options help the CAPTCHA blend seamlessly into any Groovy or Grails UI without harming accessibility or CLS metrics.
How does TrustCaptcha keep bots out without hurting user experience?
The service first applies a fast proof-of-work puzzle that runs in the background; if behaviour looks risky, it silently increases difficulty or blocks the request. An AI bot-score analyses device and session signals, so only high-risk traffic faces tougher challenges, keeping 99 % of human visits friction-free. Compared with proof-of-work-only rivals, this multi-layer model stops sophisticated scripts while remaining practically invisible to genuine users.
Losing leads to CAPTCHAs?

TrustCaptcha blocks spam and bots, not customers. No puzzles, GDPR-ready, EU-hosted.

CAPTCHA start
CAPTCHA done
Puzzle-free UX
Runs in the background while visitors type — so more people finish your forms and fewer drop off.
GDPR-ready
EU-hosted and privacy-first: no cookies, encrypted transmission, automatic cleanup — with ready-to-use legal resources.
Multi-layer Security
Adaptive protection plus intelligent risk scoring stops abuse early — even when attack traffic spikes.
Full Control
Fine-tune sensitivity, set allow/block lists, and use geoblocking — you decide how strict verification should be.

Protect your Groovy application with TrustCaptcha in just a few steps!

  • EU-hosted & GDPR-ready
  • No puzzles
  • Try free for 14 days