Spam Protection

ALTCHA Integration

Privacy-first, self-hosted CAPTCHA alternative

ALTCHA is a privacy-first, self-hosted CAPTCHA alternative that provides excellent spam protection without requiring external accounts or tracking. It's available for Pro tier users and offers a better user experience than traditional CAPTCHAs.

Why Choose ALTCHA?

RECOMMENDED
  • ✅ No external accounts required (no Google account needed)
  • ✅ Privacy-first: No tracking, no cookies, GDPR-compliant
  • ✅ Better user experience: Smooth, non-intrusive
  • ✅ Self-hosted: No dependency on external services
  • ✅ Effective spam protection

Pro Feature

ALTCHA is available for Pro tier users. Upgrade to Pro to use this feature.

How ALTCHA Works

ALTCHA uses a proof-of-work challenge that requires computational effort to solve:

1. Challenge Generation

When your form loads, ALTCHA requests a challenge from Static Forms. The challenge is a cryptographic puzzle that requires computational work to solve.

2. Client-Side Solving

The ALTCHA widget solves the challenge in the user's browser. This typically takes a few seconds and happens automatically in the background.

3. Verification

When the form is submitted, Static Forms verifies the ALTCHA solution. If valid, the submission is processed. If invalid or missing, the submission is rejected.

Setup

Setting up ALTCHA is straightforward and requires no external accounts:

1

Enable ALTCHA in Dashboard

Go to your CAPTCHA settings in the Static Forms dashboard and enable ALTCHA protection.

2

Add ALTCHA Script to Your Page

Include the ALTCHA JavaScript library in your HTML page:

HTML
3

Add ALTCHA Widget to Your Form

Add the ALTCHA widget to your form with the challenge URL:

HTML

Complete Example

Here's a complete form example with ALTCHA:

HTML

Widget Attributes

The ALTCHA widget supports several configuration options:

AttributeDescriptionRequired
challengeurlURL to fetch the challenge from Static FormsYes
hidefooterHide the ALTCHA footer textNo
stringsCustomize widget text strings (JSON)No

Challenge URL Format

The challenge URL must include your API key as a query parameter:

TEXT

API Key in URL

The API key in the challenge URL is safe to expose in client-side code. It's only used to generate challenges and cannot be used to access your account or perform sensitive operations.

Rate Limiting

The ALTCHA challenge endpoint has rate limiting to prevent abuse:

  • Limit: 10 requests per minute per API key
  • Response: 429 Too Many Requests if exceeded
  • Reset: Automatically resets after 1 minute

Rate Limit Best Practice

The rate limit is per API key, not per user. For high-traffic sites, consider caching the challenge or implementing client-side rate limiting. Most normal usage won't hit this limit.

Framework Integration

ALTCHA works with any framework. Here are examples for popular frameworks:

React / Next.js

TypeScript

Troubleshooting

Widget Not Loading

  • Verify the ALTCHA script is loaded before the widget
  • Check that you're using type="module" in the script tag
  • Ensure ALTCHA is enabled in your dashboard settings
  • Check browser console for JavaScript errors

Challenge Not Loading

  • Verify your API key is correct in the challenge URL
  • Check that you have a Pro tier account
  • Ensure ALTCHA is enabled in dashboard settings
  • Check network tab for failed requests

Rate Limit Errors

  • Wait 1 minute before retrying
  • Check if multiple forms are using the same API key
  • Consider implementing client-side caching of challenges

Submissions Rejected

  • Ensure the ALTCHA widget is included in your form
  • Wait for the challenge to complete before submitting
  • Check that ALTCHA is enabled in your dashboard
  • Verify the challenge URL is correct

Best Practices

Load Script in Head

Load the ALTCHA script in the <head> section to ensure it's available when the widget renders.

Use Environment Variables

Store your API key in environment variables for better security and easier management across environments.

Hide Footer for Cleaner UI

Use hidefooter="true" to hide the ALTCHA footer text for a cleaner form appearance.

Test on Staging First

Always test ALTCHA integration on a staging environment before deploying to production.

Comparison with Other Options

ALTCHA offers unique advantages:

FeatureALTCHAreCAPTCHAHoneypot
PrivacyExcellentGoodExcellent
External AccountNoYes (Google)No
User ExperienceExcellentGoodExcellent
EffectivenessExcellentExcellentGood
Tier RequiredProAll (v2), Pro (v3)Free

Recommended

For Pro tier users, ALTCHA is our recommended spam protection solution due to its privacy benefits, excellent user experience, and effectiveness. It provides the best balance of protection and user experience.