28 lines
687 B
Markdown
28 lines
687 B
Markdown
|
[![status-badge](https://ci.batsense.net/api/badges/108/status.svg)](https://ci.batsense.net/repos/108)
|
||
|
|
||
|
---
|
||
|
|
||
|
# mcaptcha-api-js: Library to interact with with mCaptcha API
|
||
|
|
||
|
This library provides a convenient interface to validate [mCaptcha authorization
|
||
|
tokens](https://mcaptcha.org/docs/webmasters/terminology#authorization-token) presented by
|
||
|
Visitors against your mCaptcha instance.
|
||
|
|
||
|
## Install
|
||
|
|
||
|
```bash
|
||
|
npm i @mcaptcha/mcaptcha-api-js
|
||
|
```
|
||
|
|
||
|
## Example
|
||
|
|
||
|
```javascript
|
||
|
let mcaptcha = new MCaptcha(
|
||
|
"sitekeyfromdashboard",
|
||
|
"settingsfromdashboardsettingspage",
|
||
|
"https://mcaptcha.example.org"
|
||
|
);
|
||
|
let res = await mcaptcha.verify("token");
|
||
|
console.log(`verification status: ${res}`);
|
||
|
```
|