signals, and the dashboard Patterns that surface how one identity connects across many sessions — to prevent fraud and abuse, measure traffic quality, or recognize a trusted returning visitor. ShieldLabs scores the request; your application owns the verdict, so every threshold below lives in your code where you can read it, log it, and tune it.
The tutorials share the same building blocks:
- The snippet collects 100+ signals.
- A webhook (or a History API read) delivers the six identifiers and the explainable Risk Score (0-100) with its
signals. - You build your own logic on that score and its signals. The Clean / Low / Medium / High bands are a guide, not a rule.
- The dashboard Patterns grade an identity over time, surfacing the many-accounts-on-one-device shapes a single request cannot see.
The logic every tutorial follows
Every tutorial is the same four moves; only the action and the thresholds change:- Identify at the action (signup, login, checkout). You get the durable DeviceID, and you pass your own UserHID so the account is tied to the device. Cleared cookies, incognito, and a new IP do not break that link.
- Read the anonymity in real time. The Risk Score and its
signalstell you whether this session is masked right now. - Count on the device. Several distinct UserHIDs on one DeviceID (or one Local IP) is not abuse on its own — how many is too many depends on your platform (an email provider may expect several accounts behind one device, while a bank expects one account per customer). Your code counts it at the action against your own threshold, and the dashboard Patterns surface the same correlation over time for what one request cannot see.
- Act in your own code. Allow, challenge, review, or block at the action, and use Patterns exports as watchlists for offline review. ShieldLabs surfaces the evidence; your code owns every verdict.
New here? Start with the Quickstart to install the snippet and receive your first score, then Acting on the Risk Score for the decision pattern every tutorial below reuses.
Account and access
New Account Fraud
Catch multi-accounting and farm signups by joining the Risk Score with the DeviceID at registration.
Multi-Accounting
Link many accounts back to one person through a shared DeviceID and network, the pattern behind bonus, trial, and loyalty abuse.
Account Takeover
Compare the login DeviceID against the account’s history and step up when a known account hits a new device or country.
Credential Stuffing
Score login anonymity and throttle on the durable DeviceID so rotated IPs stop resetting your limits.
Login and 2FA
Call
forceCheckAuthenticatedUser at login and step up to 2FA when the session scores Medium or High.Account Sharing
See one account spread across many devices and countries, and enforce your own sharing policy.
Ban Enforcement
Key bans to the durable DeviceID so a cleared cookie or a fresh account does not let someone back in.
SMS Pumping
Rate-limit verification SMS on the durable DeviceID so one session cannot flood your messaging bill with OTP toll fraud.
Promotions and rewards
Promo Abuse
Count the accounts and redemptions tied to one device to stop signup-bonus and free-trial farming.
Bonus Abuse
Catch repeat signup and deposit bonuses claimed through duplicate accounts on the same device.
Free-Trial Abuse
Spot new accounts cycling the same device to re-claim free trials and free-tier quotas.
Loyalty Fraud
See points and tier rewards farmed across many linked identities instead of genuine activity.
Affiliate Fraud
Rank referral and promo conversions by anonymous-traffic share so masked clicks do not get paid out.
Sybil Attack
Tie many wallets or identities back to one actor before an airdrop, vote, or quota pays out.
Coupon Abuse
Tie each redemption to the DeviceID to enforce one-per-customer codes and refuse reused single-use coupons.
Payments and content
Checkout
Re-identify right before payment, then challenge or hold orders carrying strong anonymity signals.
Chargeback Dispute
Reconstruct a buyer’s device history into evidence against friendly-fraud chargebacks.
Paywall Enforcement
Meter free views on the DeviceID, which clearing cookies or opening incognito cannot reset.
Regional Pricing
Read the anonymity signals and the IP country to catch VPN-masked region switching before you discount.
Card Testing
Anchor each checkout attempt to the durable DeviceID so your code can throttle card attempts and gate masked sessions.
Traffic and experience
Traffic Quality
Score every visit by source and channel to measure cost per real visitor, not per click.
Returning Visitor
Recognize a clean returning device to cut friction for trusted visitors, the inverse of the fraud checks.
How every tutorial is shaped
Identify at the right moment
Load the snippet on the relevant page. For sensitive actions (login, payment, withdrawal) call
forceCheckAnonymous or forceCheckAuthenticatedUser to clear the session and re-score on the spot. Always pass a hashed account id (UserHID) to the authenticated calls, never a raw email.Receive the identity and Risk Score
Each scored identification carries the six identifiers — the durable DeviceID among them — alongside the explainable Risk Score and its
signals. Most tutorials key on that DeviceID, not the score alone: it is what links the “new” accounts a farm spins up. You receive it on the webhook, or read the same result from the History API by request_id when a webhook is ever missed. The server waits up to ~60 seconds for an optional follow-up network check, then posts the final score once (about a second when no follow-up is expected). Verify X-Shield-Signature on the raw body and make your handler idempotent on request_id.The
signal text is a free-form display label: it can include extra detail and may differ from the friendly names in the Risk Score weight table, so don’t branch on the exact string. Use the stable detection_flags booleans to act on a specific signal, and weigh what each one means for your case — a 30 from one signal is not the same as a 30 from another.The Risk Score is 0-100, hard-capped at 100, in four bands: Clean (0-9), Low (10-29), Medium (30-59), High (60-100). A higher score means more anonymous or masked traffic, not a confirmed verdict. A legitimate visitor can score high (a corporate proxy, a VPN, or a privacy browser), so decide on Score plus
signals plus action context, never the number alone, and tune thresholds gradually.The shared webhook-cache helper
Every tutorial receives the score the same way: verifyX-Shield-Signature on the raw body, respond fast, store the result by request_id, and let the request path read it back with a short timeout. This is the canonical scoreCache and waitForScore helper the individual tutorials link to instead of repeating it.
webhook-cache.js