foxhat-javascript-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.101 • Public • Published

Integrating FoxHat JavaScript

Introduction

Get started with the FoxHat JavaScript SDK today and empower your applications with the security they deserve!

Features

  • Browser bot detection
  • Headless browser detection
  • Incognito detection
  • VPN detection

Installation

To install the FoxHat JavaScript SDK, run the following command in your terminal:

npm install foxhat-javascript-sdk

Usage

Initializing the SDK

To use the FoxHat SDK, you need to create an instance of the FoxHat class. Provide your API key when initializing:

const foxtHatInstance = new FoxHat.FoxHat(apiKey, true);

Parameters:

  • apiKey: Your unique API key provided by FoxHat, required for SDK initialization.
  • debugMode: The second parameter (true) enables debug mode, which can be helpful during development.

Getting a Token

Once the SDK is initialized, you can retrieve a security token necessary for making authorized API requests. Here's how to obtain and display the token:

foxtHatInstance.token()
    .then(result => {
        console.log(result)
    })
    .catch(error => {
        console.error('Error fetching token:', error);
    });

Readme

Keywords

Package Sidebar

Install

npm i foxhat-javascript-sdk

Weekly Downloads

22

Version

0.0.101

License

none

Unpacked Size

1.51 MB

Total Files

9

Last publish

Collaborators

  • foxhat