documentation
From browser evidence to visitor ID.
An SDK that collects evidence, and a self-hosted API that checks it. Both are MIT licensed, and these pages are generated from their READMEs.
Overview
The browser SDK collects signals and hashes them locally. Its identify() function posts the evidence to a public TLS listener and returns an identificationId. The internal check API evaluates that ID, an
email or domain, and an IP address, and returns a server-issued visitorId when visitor
reconciliation resolves.
Your page sends the identification ID with the form, and your server asks the check API. The API reports evidence; it does not block authentication. Missing or failed identification stays unknown, and your code decides what to do next.
Evidence, not proof. A profile hash is not proof of device identity. Devices can collide, and settings, updates or missing signals can split repeat visits. Identification accuracy comparable to FingerprintJS has not been established.
Visitor IDs, not fingerprint hashes
identificationId references one observation for one hour. It changes each time
the browser identifies. visitorId is the application-facing identity: store it on your
accounts to compare repeat visits. The server keeps a random 128-bit visitor ID with an immutable
evidence reference and exact aliases until explicit deletion.
Matching complete evidence returns the existing ID. The current narrow locale rule also allows language or time-zone changes when every other required signal agrees. Other changes can still split visits; indistinguishable browsers can share an ID. This is experimental reconciliation, not proof of a person or physical device.
The SDK's collect() hashes are diagnostic evidence, not visitor IDs. Backend
responses do not expose fingerprint hashes or identity-group hashes. Never substitute a hash,
IP address or observation ID when visitorId is missing.
Quickstart: resolve a visitor ID
1. Install
npm install @openfingerprint/sdk2. Identify in the browser
Call watch() as the page loads: it catches drivers that run code in the page and
counts input. Call identify({ endpoint }) ahead of signup, not while
the visitor waits. It posts evidence to the public listener, which sees the browser's own
headers and TLS handshake, and returns an identificationId. events.openfingerprint.com/v1/identify is the Cloud endpoint; self-hosted APIs
run their own mandatory TLS listener. collect() remains a local-only building block.
import { identify, watch } from '@openfingerprint/sdk';
// Only after your disclosure and consent requirements are met.
watch(); // as the page loads
// Later, ahead of submit:
const { identificationId } = await identify({
endpoint: 'https://events.openfingerprint.com/v1/identify'
});
// Send identificationId with your signup form; null means unknown.3. Resolve the visitor on your server
Send identificationId with whatever else you have. If identification failed, omit
the ID or send null; email and IP checks still work. API is https://api.openfingerprint.com or your own API, and KEY your Cloud API key. The API refuses requests that carry
an Origin header, so call it from your backend, never from the page. POST /v1/check is the route name for both visitor resolution and optional
security checks. Send a fresh identificationId, not a stored visitorId.
const result = await fetch(`${API}/v1/check`, {
method: 'POST',
headers: { 'content-type': 'application/json', 'x-api-key': KEY },
body: JSON.stringify({ identificationId, email, ip })
});
if (!result.ok) throw new Error("Visitor identification failed");
const identification = await result.json();4. Decide in your code
The compact response includes visitorId when resolved, plus known security facts. The
persistence and verification functions below belong to your application.
{"visitorId":"sBWUk7M37ufD1Jfd2jzF_w",
"replayed":false,
"ageMs":1830,
"automation":true,
"tampering":false,
"spoofing":false,
"behavior":["clicks_without_movement"],
"disposable":false,
"free":true,
"mx":true,
"country":"us"}if (identification.visitorId) {
await saveVisitorId(account.id, identification.visitorId);
}
if (identification.automation || identification.disposable) {
return requireEmailVerification();
}
const visitorUnknown = identification.visitorId === undefined;Delete a visitor
DELETE /v1/visitors/{visitorId} removes one visitor ID from your account's
identity partition, with its aliases and matching indexes, for example when a person asks you to
erase their data. It only ever reaches your own account's visitors: the partition comes from your
API key, so another account's ID is simply not found. It is idempotent and not billable, and does
not change this month's active visitor count. The person's next visit gets a new visitor ID, which
counts as a new active visitor.
const result = await fetch(`${API}/v1/visitors/${visitorId}`, {
method: 'DELETE',
headers: { 'x-api-key': KEY }
});
const { deleted } = await result.json(); // false: no such visitor in your accountCustomer scopes and self-hosting
Cloud selects the identity partition from the organization owning your secret API key. Keys
for the same organization share visitor identities; different organizations do not. Do not
send a browser-selected visitorScope. Canonical page origins also remain
separate: the same browser on two subdomains is not automatically joined.
Self-hosted visitor resolution requires PostgreSQL, a stable deployment namespace and the visitor migrations. Without PostgreSQL the API still returns security evidence, but no visitor ID. Redis's one-hour observations are not a substitute for the retained visitor store. Follow the PostgreSQL setup.
A single-customer install can use its deployment namespace unchanged, or set a stable postgres.visitorScope default. Shared hosts should require an explicit scope with postgres.requireVisitorScope: true and derive it from the authenticated customer on
the backend. Scope is an isolation key, not authentication.
Changing a namespace or scope starts a separate identity partition. Moving to Cloud can preserve IDs only by importing the retained visitor records, profiles, aliases and indexes into your assigned partition. Reusing a scope string alone does not migrate them; there is no self-service importer yet.
Reading the response
A key that is missing means unknown. This includes visitorId:
incomplete or ambiguous evidence, an unavailable store, or an expired observation must not be
treated as a match. An unlisted domain or an uncovered IP is never reported as clean.
| Key | Meaning |
|---|---|
| visitorId | A random server-issued browser grouping. Present only when reconciliation resolves; otherwise absent, not null or a fingerprint hash. |
| replayed, ageMs | Whether this identification was looked up before, and milliseconds since the API stored it, by its clock. |
| automation, tampering | The browser reported automation tooling, or altered canvas or audio readback. |
| spoofing | The browser's own report contradicts the headers or TLS handshake observed by the public identify listener. |
| behavior | Input patterns since the page called watch(), such as clicks without pointer movement. Context for your rules, not a verdict. |
| disposable, free, spam, relay, cheapTld, mx | From domain or the domain of email. free is a public mailbox, mx says the domain has mail servers. |
| country, vpn, tor, datacenter, proxy | From ip. country is a lowercase ISO 3166-1 alpha-2 code. |
| invalid | Only present when an input was rejected: a list of the offending input names. |
With detail: true, read identification.visitorId and identification.reconciliation for the status, rule version and match method (new, exact or locale-v1). A valid observation can still have an
unresolved visitor. Visitor fields are absent when PostgreSQL is not configured.
The evidence is client-reported and can be forged. replayed means the same
identification was looked up before; ageMs comes from the API's clock. The TLS handshake
can expose a script claiming to be a browser, but an unlisted handshake stays unknown and a real
browser under automation has a real handshake. Treat these as review context, not authentication
or blocking rules.
Where next
- Browser SDK → Options, the result and its schema, automation and tampering observations, browser limits.
- Visitor IDs and API → Every request field and response key, configuration, security and metrics.
- Deploy with Helm → Run the API on Kubernetes with Redis and network policies.
- Datasets → Where the domain and network data comes from, its licenses and how it refreshes.
- Identification study → Measure accuracy on consented, externally labelled captures.
Something unclear or wrong? Write to support@openfingerprint.com.