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.


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:

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.
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:
<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:
// 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:
// 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.
4. Congratulations 🎉
You are now protected by TrustCaptcha - congratulations!

FAQs
What is a Groovy CAPTCHA?
What is the best Groovy CAPTCHA?
How does a Groovy CAPTCHA work?
Do I need a Groovy CAPTCHA?
Is TrustCaptcha GDPR-compliant for EU deployments?
Can I customize the look and feel of TrustCaptcha?
How does TrustCaptcha keep bots out without hurting user experience?
TrustCaptcha blocks spam and bots, not customers. No puzzles, GDPR-ready, EU-hosted.


Protect your Groovy application with TrustCaptcha in just a few steps!
- EU-hosted & GDPR-ready
- No puzzles
- Try free for 14 days