1.0.10 • Published 9 months ago

fingerprintjs-pro v1.0.10

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

FingerprintJS Pro - Usage Guide

Introduction

This guide explains how to use fingerprintjs-pro to obtain a unique token with a single function call. Note that fingerprintjs-pro requires an API key and is restricted to specific domains.

Features

  • Accurate Device Identification: Identify users across browsers and devices.
  • Enhanced Security: Prevent fraud and unauthorized access.
  • Easy Integration: Simple API for seamless integration.
  • Fast & Reliable: Generates fingerprints in milliseconds.
  • React Compatible: Works in React applications.
  • Unique Browser ID: Generates a unique ID per browser instance.

Installation

Install fingerprintjs-pro using npm or yarn:

npm install fingerprintjs-pro

or

yarn add fingerprintjs-pro

Importing the Function

Import getFingerprint in your JavaScript/TypeScript file:

import { getFingerprint } from 'fingerprintjs-pro';

Getting the Token

Call getFingerprint() with your API key:

async function fetchToken(apiKey) {
    try {
        const response = await getFingerprint(apiKey);
        console.log('API Response:', response);
    } catch (error) {
        console.error('Error fetching fingerprint:', error);
    }
}

fetchToken('your-api-key-here');

API Response Format

{
    "status": 200,
    "token": "e3fee4271f1c4f1552a2cfe15ac470162f7b7d8b97b65a6f7495cc65cff103a7"
}

Response Fields

  • status: HTTP status code (200 means success)
  • token: Unique token

Error Handling

Handle potential errors like network issues or API failures:

async function fetchToken(apiKey) {
    try {
        const response = await getFingerprint(apiKey);
        if (response.status === 200) {
            console.log('Token:', response.token);
        } else {
            console.warn('Unexpected response:', response);
        }
    } catch (error) {
        console.error('Failed to fetch token:', error);
    }
}

Conclusion

Use fingerprintjs-pro to retrieve unique tokens securely. Ensure error handling and domain access validation.

1.0.10

9 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.0

10 months ago