@captchafox/node
v1.2.0
Published
[![NPM version](https://img.shields.io/npm/v/@captchafox/node.svg)](https://www.npmjs.com/package/@captchafox/node)
Downloads
2,213
Readme
@captchafox/node
Installation
Install the library using your prefered package manager
npm install @captchafox/node
yarn add @captchafox/node
pnpm add @captchafox/node
bun add @captchafox/node
Usage
ESM / await
import { verify } from '@captchafox/node';
const secret = 'organization_secret';
const token = 'widget_token';
try {
const data = await verify(secret, token);
if (data.success) {
console.log('success!', data);
} else {
console.log('verification failed');
}
} catch (error) {
console.log(error);
}
Require
const { verify } = require('@captchafox/node');
const secret = 'organization_secret';
const token = 'widget_token';
verify(secret, token)
.then((data) => {
if (data.success) {
console.log('success!', data);
} else {
console.log('verification failed');
}
})
.catch(console.error);