Skip to content

BehavLabs developer docs

A dependency-free browser script records how people type, point, scroll and touch, and streams it to the BehavLabs API with your users' consent. The API scores every desktop session as it happens and tells your server when the person at the keyboard no longer matches the person who signed in.

This is the reference for SDK 2.4.0 and API v1 (developer alpha).

  • Quickstart


    One script tag, a consent call and a risk check. Running in about ten minutes.

    Get started

  • How scoring works


    Windows, templates, calibrated evidence and the two alarm thresholds, with measured error rates.

    Read the method

  • Risk API


    Read a session's takeover risk from your server, or get a signed webhook when it alarms.

    Risk endpoints

  • SDK reference


    Every option, method and status event of the collection script.

    Configuration

At a glance

Script https://behavlabs.com/sdk/behavlabs-sdk-2.4.0.js (23 KB, 7.2 KB gzipped, no dependencies)
API base URL https://api.behavlabs.com/v1/collect
Keys pk_beta_… publishable, in the page. sk_beta_… secret, server only
Browsers Current browsers. Uses Web Workers and CompressionStream where available and falls back otherwise. Tested in Chromium
Status Alpha: collection, live session takeover risk (desktop), webhooks, usage and erasure

Use risk to step up, not to lock out

Risk scores are measured, not guaranteed: How scoring works gives the error rates and their limits. Use an alarm to ask for re-authentication, not to lock people out on its own.

Questions, or a key for your app: zach@behavlabs.com