What it does
getDeviceId forces the binding filter to hardware-only regardless of anything in the options argument. Engine-bound collectors — audio, canvas, WebGL params, math, and others — are skipped entirely. Only the five hardware-bound signals (fonts, webgl_gpu_identity, platform, timezone, and any hardware-tier-2 signals you opt in to) are collected.
The result is faster (~200–300 ms vs ~1–1.5 s for getFingerprint) and produces a hash that does not change when the user switches browsers, opens an incognito window, or clears their browser cache. On any uncaught error the function returns an empty DeviceIdResult rather than throwing.
When to use it
Use getDeviceId whenever you need to identify the physical device rather than a specific browser session. Common cases: MFA step-up (has this user authenticated from this device before?), cross-browser device linking (same hardware seen in Chrome and Safari?), and software license enforcement (is this device already registered?).
When you also need browser-level signals — spoofing detection, bot detection, or distinguishing two users sharing the same machine — use getFingerprint instead, which runs the full pipeline and returns both hashes.
Return shape
DeviceIdResult is a focused subset of FingerprintResult. The id field is the hardware hash. The signals map contains only the hardware signals that were collected; raw values appear only when debug: true is set.
DeviceIdResult fields
| Field | Type | Description |
|---|---|---|
| id | string | 16-char hex hardware fingerprint. Same value as hardwareFingerprint in FingerprintResult. |
| confidence | number | 0.0–1.0 collection quality score derived from the cross-browser hardware hash. |
| stableSignals | string[] | Signal names that contributed to the hardware hash. |
| unstableSignals | string[] | Signal names that were collected but excluded from the hardware hash. |
| consistency | ConsistencyResult | Anti-detect browser detection — spoofLikelihood and flags. |
| incognito | IncognitoResult | Private-mode detection — incognitoLikelihood and flags. |
| automation | AutomationResult | Automation-framework detection — automationLikelihood and flags. |
| collectionTimeMs | number | Wall-clock time the hardware collection pass took. |
| version | string | Library version string. |
| signals | Record<string, SignalResult> | Per-signal result map. Hardware signals only. |
import { getDeviceId } from 'doorman-benny';
const { id, confidence, consistency, incognito } = await getDeviceId();
// Use id as a stable device identifier — consistent across browsers and incognito.
console.log(id); // "7c2e9a4b8f1d6e3a"
console.log(confidence); // 0.82
// Check for anti-detect tooling even on the hardware path.
if (consistency.spoofLikelihood === 'high') {
flagForReview('Anti-detect browser on hardware collection');
}
// Opt in to tier 2 for media_devices coverage.
const result2 = await getDeviceId({ tiers: [1, 2] });
console.log(result2.id);getDeviceId accepts the same FingerprintOptions as getFingerprint. The bindings filter is forced to hardware-only and cannot be overridden.

