The Fingerprint Server Node SDK is an easy way to interact with our Server API from your Node application. You can retrieve visitor history or individual identification events.
How to install
Add @fingerprintjs/fingerprintjs-pro-server-api
as a dependency to your application via npm or yarn.
npm install @fingerprintjs/fingerprintjs-pro-server-api
yarn add @fingerprintjs/fingerprintjs-pro-server-api
Initialize the client instance and use it to make API requests. You need to specify your secret API key and region.
import {
FingerprintJsServerApiClient,
Region,
} from '@fingerprintjs/fingerprintjs-pro-server-api'
const client = new FingerprintJsServerApiClient({
apiKey: '<SECRET_API_KEY>',
region: Region.Global,
})
// Get visit history of a specific visitor
client.getVisits('<visitorId>').then((visitorHistory) => {
console.log(visitorHistory)
})
// Get a specific identification event
client.getEvent('<requestId>').then((event) => {
console.log(event)
})
Documentation
You can find the full documentation in the official GitHub repository.