Guides

Reading events

Read identification events with a secret key: one event by request ID, or a window of events filtered by visitor or level, for up to 30 days.

Every identification is stored as an event you can read with a secret key for 30 days. Read one to verify an identification, or list a window of them to investigate a visitor, backfill your warehouse or reconcile with webhooks.

One event

import { load } from '@fingerly/node'

const fingerly = load({ secretKey: process.env.FINGERLY_SECRET_KEY! })
const event = await fingerly.events.get('01a0a84b-e6a2-7c09-9f51-0b3d7a26c8e4')

A single event also includes the archived submission as document, with the threshold and weights profile that scored it, and any deferred report as deferred_signals. See Get an event.

A window of events

const page = await fingerly.events.list({ level: 'high', limit: 50 })
ParameterDefaultNotes
from, toThe last 24 hoursRFC 3339. At most 30 days wide, starting at most 30 days ago.
page, limit1, 10limit is at most 200. Pages reach back at most 10,000 events.
visitornoneOne exact visitor ID.
levelnonelow, medium or high.

Everything a visitor did

const history = await fingerly.events.list({
  visitor: 'X9pL2mRc7KvT4bQw8NdF',
  from: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000),
  limit: 200,
})

Paging through a window

async function* allEvents(from: Date, to: Date) {
  for (let page = 1; ; page++) {
    const result = await fingerly.events.list({ from, to, page, limit: 200 })
    yield* result.rows
    if (result.rows.length < result.page_size) return
  }
}

Triggers in events

Events group their triggers by signal group: a trigger's signal is the group, such as vpn, and its weight is what the group added. The identify response and the visitor.suspect webhook list the individual signals.