Quickstart

Classify an IP, then add login fraud detection, in about five minutes.

1. Enrich an IP (Context API)

Grab an API key from the console and call the Context API:

 shell
# enrich any IP from your backend
curl "https://api.farox.io/v1/context/1.1.1.1" \
  -H "Authorization: Bearer <api key>"

2. Add Prism to a login page

Drop the tag and a hidden field. Prism assesses the client and fills the field with an opaque assessment id:

 html
<!-- 1. load Prism on your login / signup page -->
<script async id="_farox"
  src="https://cdn.farox.io/f.js?k=<publishable key>"></script>

<!-- 2. Prism auto-fills this with the assessment id -->
<input type="hidden" name="farox_token">

3. Verify server-side

On form submit, exchange the id for the authoritative verdict with your secret key. Never trust the client copy of the verdict:

 node
// 3. on your backend, verify the token with your secret key
const a = await fetch(
  "https://api.farox.io/api/prism/assessment/" + req.body.farox_token,
  { headers: { "X-Farox-Secret": process.env.FAROX_SECRET } })
  .then(r => r.json())
if (a.verdict.anonymized) flagForReview(a)

That is the whole loop. Next: client integration for React / Next / edge, or the Context API reference.