1.0.4 • Published 4 years ago
@botprotect/botprotect v1.0.4
BotProtect API
JavaScript API for BotProtect APIv1
Installation
$ npm install botprotect
Usage
You must be a registered client to use this API. Please request a demo on our website. Already registered? Here is how you use it!
To initiate the library:
const { BotProtectApi } = require('botprotect');
const BotProtect = new BotProtectApi({
publicKey: 'YOUR_PUBLIC_KEY', // String
privateKey: 'YOUR_PRIVATE_KEY', // String
showFingerprint: true // Boolean
});
To verify user token:
Examples
ASYNC
(async () => {
let res = await BotProtect.verify('USER_TOKEN');
console.log(res);
})();
SYNC
BotProtect.verify('USER_TOKEN', (res) => {
console.log(res);
});
RETURN
{
"human": BOOLEAN,
"clientIp": STRING,
"isRdp": BOOLEAN,
"isVNCServer": BOOLEAN,
"solveTime": INT,
"userAgent": STRING,
"deviceBrowserFingerprint": STRING
}
Learn more on our api page.