NPM Module

NPM Module

Install

1
npm i @botbye/client
or
1
yarn add @botbye/client

Configuration

Call initPhishing with your Phishing Project client-key:

1
2
3
4
5
6
import { initPhishing } from "@botbye/client";

await initPhishing({
  // Use your Phishing Project client-key
  clientKey: "00000000-0000-0000-0000-000000000000"
});

Catchers (Optional)

To inject catchers onto your site, await the API and then call the getCatcher method.

1
2
3
4
5
6
7
8
import { initPhishing } from "@botbye/client";

const api = await initPhishing({
  // Use your Phishing Project client-key
  clientKey: "00000000-0000-0000-0000-000000000000"
});

const catcherElement = await api.getCatcher();

Insert catcherElement into the site's DOM.

1
2
3
const someForm = document.querySelector('#form');

someForm.append(catcherElement);

getCatcher options

If you are using Server-Side Integration to hide the BotBye! domain, the getCatchers method accepts an options parameter where you can specify your own URL.

1
2
3
const catcherElement = await api.getCatcher({
  url: "https://mydomain.com/catcher"
});