botbar

Quickstart

Protect a form in five minutes.

1. Create a site

In the dashboard, choose New site, name it, and list the hostnames it runs on (add localhost to test locally). Copy the sitekey and the secret; the secret is shown once.

2. Add the widget to your form

<script src="https://api.example.com/v1/api.js" async defer></script>

<form method="post" action="/signup">
  <input name="email" type="email" required />
  <div class="botbar-widget" data-sitekey="site_..." data-action="signup"></div>
  <button>Sign up</button>
</form>

The widget adds a hidden botbar-response field to the form when the visitor passes.

3. Verify the token on your server

curl https://api.example.com/v1/siteverify \
  -d secret=$BOTBAR_SECRET \
  -d response=$TOKEN_FROM_THE_FORM
{ "success": true, "hostname": "example.com", "action": "signup", "score": 0.9, "error-codes": [] }

Reject the form unless success is true, hostname is yours and action is the one you set. The server libraries do those checks for you.

4. Tune it

Watch the site's traffic in the dashboard, then move between security levels or set per-action rules.

On this page