Skip to main content

Introduction

Bot Buster Quick Checks can be placed anywhere on a website wherever there is an action that can be taken. These are button presses. Each Quick Check also must be associated with an email address somewhere on the page. This can be an email address contained in a text input or in another static HTML element. Due to this, 3 components are required and need to be set when adding a Quick Check. An email element id (data-email-element element containing the user’s email address), an action id (data-action-id button whose action will be protected by the Quick Check) and your company API key (data-api-key). The location where the Quick Check appears also must be included as a div element on the HTML page. The NPM installation is the easiest and fastest, but if you want a bit more flexibility with the widget there are also platform specific SDK integrations.

CDN Script URL

https://botbuste.b-cdn.net/prod/quick-check-inject-prod.js -> Connects to live production APIs
Your origin domain must be whitelisted. Requests from domains that are not whitelisted will be blocked.

Configuration Attributes Reference

NPM Package VS CDN Script Installation

NPM Installation

If your project uses a bundler (Vite, Webpack, Next.js, Turbopack, etc.), install the official botbuster-captcha package instead of adding the CDN <script> tag manually. The package loads the SDK for you, is safe to import during server-side rendering, and ships with TypeScript definitions.

Step 1 - Install the package

Terminal

Step 2 - Add Your Key as an Environment Variable

Keep the API key out of your source code by reading it from an environment variable. The key is used in the browser, so it needs the public prefix your framework requires.
.ENV.LOCAL

Step 3 - Import and Use

Import the component or hook in any client component. See the React / Next.js Integration section for complete login form examples.
.ENV.LOCAL

Package Exports

ExportTypePurpose
BotbusterCaptchaComponentDrop-in captcha bound to an email value.
useBotbusterHookProgrammatic control: trigger, isVerified, submissionTrackingId.
BotbusterProviderComponentConfigures apiKey and actionId once for the whole app.
reportLoginFunctionReports the final login outcome ('success' or 'failure').

React/Next.js Installation Code Examples

Option A: Drop-in Component (<BotbusterCaptcha />)

Best for standard login and signup forms. Automatically binds to the input and displays the inline container on desktop or full-screen modal on mobile devices.

Option B: Programmatic Control with useBotbuster() Hook

Best for custom validation pipelines, multi-step flows, or reporting login results directly to Bot Buster after backend verification.

React Component Props Reference

PropTypeRequiredDefaultDescription
apiKeystringYesContext / RequiredYour client authentication key.
actionIdstringYesundefinedFlow identifier (e.g., ‘login’, ‘checkout’).
emailstringYesundefinedCurrent email state. Auto-triggers verification upon valid format.
onSuccess(data) => voidundefinedCallback returning submissionTrackingId upon passing.
containerIdstringOptionalbotbuster-containerID of the mount element on desktop.

Next.js App Router Setup (<BotbusterProvider />)

Wrap your root layout to configure the API key globally. Child components can then use <BotbusterCaptcha /> without re-declaring credentials.

Installing The Quick Check Using a Direct SDK Integration

Overview & How It Works

The Bot Buster Quick Check (QC) SDK is a lightweight client-side library engineered for real-time bot mitigation and email verification.

Background SDK Information

  • Automatic Input Binding: Listens to designated email fields to verify addresses dynamically as users type.
  • Responsive Layout Modes: Adapts UI rendering based on the client viewport.
  • Desktop: Renders an inline, non-intrusive container #botbuster-container.
  • Mobile & Tablet: Displays a full-screen, touch-optimized modal dialog.
  • First-Party Security Cookie: Issues a 30-minute session cookie bb_fcid upon successful challenge completion, ensuring cross-browser persistence.
  • Event Handlers: Triggers window.onBotbusterSuccess() instantly upon verification.

Implementation Instructions

  1. Place the target render container <div id="botbuster-container"></div> inside your HTML form structure where you would like the Quick Check to appear.
  2. Please add the required Quick Check SDK code into your website as shown below with specific code examples for Vanilla HTML/JS, Vue, Svelte, WordPress, WooCommerce, Angular and Shopify. Don’t forget to specify the Configuration Attributes that are required.
In Svelte (Svelte 4/5 or SvelteKit), initialize the script inside onMount so it runs exclusively in the browser.

Vanilla HTML/JS, Svelte, Vue, WordPress, WooCommerce Code Examples

Shopify Integration

In Shopify, add the script and container to your customer login and registration templates.

Step 1: Add Container to Customer Login Form

In your Shopify theme editor, navigate to sections/main-login.liquid or templates/customers/login.liquid and find the customer login form block:

Step 2: Inject Script in theme.liquid or Login Template

Add the script right before </body> in layout/theme.liquid:
Setting data-email-element=“CustomerEmail” matches Shopify’s default customer email input ID. If using customer registration (customers/register.liquid), pass RegisterForm-email.

Angular Integration

In Angular, manage the script dynamically within a component’s lifecycle hooks (ngOnInit and ngOnDestroy).

Step 1: Add Global Typings (src/types/botbuster.d.ts)

Step 2: Angular Component (login.component.ts)

Step 3: Component Template (login.component.html)

JavaScript API Reference

window.initBotbusterSDK(email)

Programmatically forces execution of the verification pipeline for a given email parameter. window.initBotbusterSDK("user@domain.com");

window.onBotbusterSuccess

Callback handler invoked immediately upon successful user verification. The SDK clears this function reference post-execution.

Security & CSP

Upon successfully passing the challenge, the SDK sets a secure, first-party cookie on the active domain root to prevent cross-site tracking blocks. Set-Cookie: bb_fcid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx; Path=/; Max-Age=1800; SameSite=Lax; Secure

Content Security Policy (CSP) Directives

To comply with strict web security policies, adjust your standard HTTP headers.

Troubleshooting

Once the code has been added, load your webpage and check that the Quick Check is showing when the button is pressed on the page. Then go to the third step Applying Rules To Quick Checks.