{% extends "base.html" %} {% block title %}AI CAPTCHA — Embed Demo{% endblock %} {% block og_title %}AI CAPTCHA — Embed Demo{% endblock %} {% block content %}
A live, working example of the iframe embed. This page
creates a throwaway embed site, frames the challenge widget, and shows
the postMessage events + a real /api/siteverify call.
This is the actual <iframe> served by
GET /embed?sitekey=…&origin=…. Solve the puzzles
to earn a token.
Sitekey: —
The iframe posts these to the host. The host must check
event.origin + event.source and verify the
token server-side.
(waiting for events…)
POST /api/siteverify)
The security-critical step: the host backend calls
/api/siteverify with the secretkey + token. A forged or
replayed token is rejected. This demo calls it from the browser so you
can see the response — in production the secretkey never leaves your server.
Use this on any site (replace YOUR_SITEKEY with a real one
from POST /api/embed/sites).