← Files FingerprintARCHIVED FILE

skills/fingerprint-javascript/snippets/fingerprint.js

525 Bytes · Oct 5, 2026 · 18:25 UTC

↓ Download file

// src/fingerprint.js — start the agent once at app startup, export the instance.
// `start()` returns the agent synchronously; the agent script itself downloads in the
// background, and `get()` waits for it. The region MUST match your workspace
// ('us' | 'eu' | 'ap') or identification fails with "API key not found".
import * as Fingerprint from '@fingerprint/agent'

export const fp = Fingerprint.start({
  apiKey: import.meta.env.VITE_FINGERPRINT_PUBLIC_API_KEY,
  region: import.meta.env.VITE_FINGERPRINT_REGION,
})

SHA-256: c9125c7c44ed799c00db2b60c68d70c7b1d5273fc3923237e2e89c4f45925f8b