Appearance
Installation
You need a site key, a server-only secret, and operator-approved widget and verification URLs. Start with the key separation guide.
1. Add the Katcha widget to your webpage
Load the widget over HTTPS. Replace the .example host below with your deployed Katcha widget host; the local server serves /api.js. A historical CDN address is not proof that it serves the renamed widget.
html
<form id="signup" action="/signup" method="post">
<label>Email <input type="email" name="email" required /></label>
<div class="katcha" data-site-key="YOUR_SITE_KEY" data-lang="en"></div>
<button type="submit">Create account</button>
</form>
<script src="https://widget.katcha.eu/1/api.js" async defer></script>The script discovers .katcha[data-site-key] containers automatically. Keep the container inside the form so the hidden katcha-token field is submitted with other fields. Deployments may override this field name; confirm your configuration. Your server must reject unverified submissions even if JavaScript is disabled.
For WebViews without a reliable hostname, the script supports a domain override. Use the domain registered for your site, not an arbitrary value:
html
<script src="https://widget.katcha.eu/1/api.js?domain=app.example" async defer></script>Include only one script, not both examples. For dynamically inserted containers, use explicit rendering.
2. Verify the user response server-side
Read katcha-token on your server and construct this JSON body:
json
{
"challenge_id": "TOKEN_FROM_FORM",
"site_key": "YOUR_SITE_KEY",
"secret_key": "YOUR_SERVER_ONLY_SECRET"
}POST it to your configured verification URL with Content-Type: application/json. The backend field remains challenge_id: changing a form input's name does not rename the service protocol. Only success: true permits the protected action.
Treat tokens as short-lived, single-use values. Do not cache successful tokens for later requests or retry business actions with an already consumed token. Ask for a fresh challenge after failure or expiration.
See Verify a response for server code and errors, and configuration for callbacks, reset, and test behavior. The flow diagram and video from the older product are omitted: the text flow in quick start is complete without unreviewed branding or remote embeds.