Documentation

Widget overview

Choose visible, compact, or invisible widgets with click, interaction, load, or programmatic solving.

Variants

Default

Visible widget with text, checkbox, loading state, result label, and optional branding.

Compact

Small fixed-size protection indicator for forms that should solve in the background.

Invisible

No visible UI. Use load, interaction, or programmatic solving before submit.

Triggers

clickDefault. The challenge starts when the visitor clicks the widget.
interactionThe challenge starts after the first meaningful form interaction such as focus, input, change, or blur.
loadThe challenge starts once after render. Expiration re-arms interaction solving.
programmaticLeave the trigger as click or interaction and call solve() directly from your JavaScript flow.

Widget states

The element exposes its current lifecycle through data-state. Use it for styling, diagnostics, or tests, but keep server-side verification as the security decision.

StateMeaningTypical UI
idleReady to start or retry.Initial label and enabled button.
solvingThe challenge is running.Spinner or compact pulse indicator.
solvedA token was issued and written to the hidden field.Success label, checkmark, and disabled widget button.
errorThe challenge could not complete or the request was blocked.Error label and retryable widget button.

Widget error responses

These errors can appear through the widget error event or as error values from the public challenge and redeem endpoints. They should be shown as retry or support states in the browser, while your server still relies on siteverify.

ErrorStatusMeaning
billing_past_due402The organization is outside the billing grace period.
plan_limit_exceeded402The monthly protected attempt limit has been reached.
widget_variant_not_allowed402The selected widget variant is not available on the current plan.
unbranded_widget_not_allowed402data-branding="none" is not available on the current plan.
domain_not_allowed403The browser origin is not configured as a production or testing domain.
risk_blocked403Risk enforcement blocked the request before the challenge backend was called.
challenge_unavailable502HumanProof could not reach the challenge service.
test_key_not_configured422Public test keys are not configured in this environment.

Events

Listen for solve, error, reset, expired, and progress to control submit buttons and form labels.

Open the methods and events reference

Compatibility

The public custom element is human-proof. Use this element name for all new integrations.