Overview
In this 5-minute quickstart, you’ll add Keverd to a React app and get:- Persistent device IDs that survive incognito, VPNs, and browser clears
- Real-time risk scores for every user action
- Automatic fraud detection with minimal setup
Prerequisites
- Node.js 16+ and npm
- Your Favorite Code Editor
- A React app (new or existing)
- 5 minutes of your time
This quickstart covers the frontend setup only. You’ll need a backend server to receive and process device identification events for full fraud detection. Check out one of the backend quickstarts after completing this.
Step 1: Get Your API Key
- Sign up for a free Keverd account at dashboard.keverd.com/request-access
- Navigate to Settings → API Keys
- Copy your Public API Key (starts with
pk_live_)
Step 2: Install the SDK
Step 3: Wrap Your App with KeverdProvider
Add the provider at your app’s root. This prepares Keverd but does not trigger API calls yet.Step 4: Initialize Fingerprinting
Keverd only starts collecting device data and making API calls when a component callsuseKeverd(). This is intentional — it gives you control over when fingerprinting happens (e.g., on login, checkout, or app mount).
Basic usage — trigger on component mount:
How It Works
| Step | What Happens | Who Triggers It |
|---|---|---|
| 1. Provider mounts | SDK loads, validates API key | KeverdProvider |
| 2. Fingerprinting starts | Device signals collected, API call made | First useKeverd() call |
| 3. Data available | deviceId, riskScore returned to component | Hook re-renders with data |
useKeverd(), Keverd stays idle. No API calls are made. No device data is collected.
Complete Example
What About My Backend?
OnceuseKeverd() has resolved, Keverd automatically injects headers into your HTTP requests:
Testing It Works
1. Verify the Hook Triggers the Call
Open DevTools Network tab, then mount a component withuseKeverd(). You should see a request to Keverd’s API.
2. Check the Console
3. Test Incognito Persistence
4. View Your Dashboard
Visit dashboard.keverd.com to see devices, risk scores, and blocked attempts.Common Questions
Q: Can I trigger fingerprinting without rendering UI? Yes. Create an invisible component that callsuseKeverd() on mount, or call the imperative API directly (see JavaScript Quickstart).
Q: What if I call useKeverd() in multiple components? The SDK deduplicates — only one API call is made, and all components share the result.
Q: Does KeverdProvider itself make any API calls? No. It only sets up context. The first useKeverd() call triggers all fingerprinting logic.