Skip to main content

<botshield-verify> Web Component

The <botshield-verify> element is BotShield’s client-side orchestration layer. It renders a verification widget on the merchant’s page and coordinates up to three layers of defense:
  1. Passkey Verification (always on) — cryptographic human proof via device biometrics
  2. Signal Pixel (opt-in via signals="true") — passive behavioral fingerprinting and edge scoring
  3. Third-party Integrations (automatic) — Cloudflare Turnstile, reCAPTCHA, and more when configured in your dashboard Integrations settings
On success, the widget fires a callback with a PII-free verification_token, an opaque signal_token (tamper-proof bot score), and any third-party results.
Anonymous by construction. The widget never collects or returns identity. The verification_token claims are only { request_id, verified, organization_id, timestamp, nonce } — no email, no user id, no device data. The widget resolves to one of three result states: Human Verified, MultiPass Active, or Human Unavailable.

Installation

Add a single script tag to your page. No npm install, no build step.
The script registers the <botshield-verify> custom element globally. It uses a closed Shadow DOM so it never conflicts with your page styles.

Quick Start

Attributes

The token passed to onsuccess is the PII-free verification_token. On a MultiPass fast-path success it may be null (no challenge token is minted) — listen for botshield:multipass-status if you need to distinguish the MultiPass Active result. There is no identity in any callback payload.

Events

In addition to callback attributes, the element dispatches standard Custom Events:

Signal Pixel

When signals="true", an invisible 1x1 iframe collects behavioral fingerprints alongside the verification widget: Edge signals (server-side, can’t be spoofed):
  • Datacenter ASN detection
  • TLS fingerprint analysis
  • HTTP protocol version
  • IP velocity tracking
  • Header anomaly detection
Behavioral signals (client-side):
  • WebDriver / automation flags
  • Canvas fingerprint
  • WebGL renderer
  • Mouse / touch events
  • Screen & hardware profile
The combined score (0–100) is returned in the signal_score field. However, this client-side score can be spoofed via DevTools. For tamper-proof validation, use the signal_token:
See the Signal Pixel reference for score ranges and signal details.

Third-Party Integrations

BotShield automatically loads and validates third-party bot detection tools when configured in your dashboard Integrations settings.

Cloudflare Turnstile

When Turnstile is enabled for your organization:
  1. The web component loads the Turnstile script automatically
  2. An invisible Turnstile widget runs in the background
  3. The Turnstile token is collected and returned in e.detail.turnstile_token
  4. BotShield validates the token server-side using your stored secret key
  5. The pass/fail result is included in your verification confidence score
No code changes required — just enable Turnstile in your dashboard and add your keys. Recommended Turnstile settings:
  • Widget Mode: Invisible — BotShield handles all UI
  • Pre-clearance: Yes — let verified visitors bypass lower CF challenges
  • Pre-clearance Level: Interactive (high) — BotShield provides the real biometric proof

Adding More Integrations

reCAPTCHA, DataDome, HUMAN, and more are coming. Each integration follows the same pattern: configure in your dashboard, BotShield auto-loads and validates. Contact us to request an integration.

Server-Side Validation

Never trust client-side state alone. The widget appearance, signal_score, and even the token must be validated on your server. BotShield provides three levels of server-side validation.

1. Verify the Verification Token

The primary check — validate the signed, PII-free verification_token that proves a human completed the challenge. No shared secret is needed: BotShield holds the signing key, so the token itself is the proof.

2. Validate the Signal Token (tamper-proof bot score)

If you’re using the Signal Pixel (signals="true"), validate the signal_token to get the real server-side bot score:
Signal tokens are one-time use and expire after 10 minutes. The signal_score in the client event is for display only — always use signal_token for security decisions.

3. Combined Confidence Score

When all signals are present, BotShield combines them into a single confidence score:

Visual States

The widget transitions through five states, mapping to the three Census result states:
The visual state is derived client-side from the anonymous result — it is not a transmitted field. The cause of a Human Unavailable result (failed presence vs. infrastructure) is never distinguished at the partner boundary.

Themes

White background (#f9f9f9), gray border (#bebfc1), dark text.

JavaScript API

BotShield.render() — Programmatic Rendering

Create and mount a verification widget from JavaScript. Works with SPAs (React, Vue, Angular) and anywhere you need programmatic control.
Options: Returns a widget handle:

Direct Element Access

If you prefer HTML attributes, you can also query the element directly:

Framework Examples

React:
Vue 3:

QR Scan Mode

When a desktop user needs to verify on their phone (cross-device flow), the scan-mode attribute controls the presentation:
Shows a QR code overlay on the current page with:
  • BotShield logo and step-by-step instructions
  • QR code for phone scanning
  • “Waiting for verification…” status with auto-close on completion
  • Cancel button

Redirect

Opens a full-page verification screen in a new tab.

Form Integration

When placed inside a <form>, the widget automatically injects a hidden input with the verification token:

Platform Examples

Shopify (Cart Page)

WooCommerce

Escalation Pattern (with existing bot detection)

Use BotShield alongside your existing bot detection tool. Only show the verification widget when your existing tool is uncertain:

Next Steps