https://github.com/imufeng/gt4-node-sdk
GeeTest v4 NodeJS SDK
https://github.com/imufeng/gt4-node-sdk
geetest sdk
Last synced: about 1 year ago
JSON representation
GeeTest v4 NodeJS SDK
- Host: GitHub
- URL: https://github.com/imufeng/gt4-node-sdk
- Owner: iMuFeng
- License: mit
- Created: 2022-04-25T04:46:32.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-28T02:11:09.000Z (about 4 years ago)
- Last Synced: 2025-03-08T13:36:14.151Z (over 1 year ago)
- Topics: geetest, sdk
- Language: TypeScript
- Homepage:
- Size: 89.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GeeTest v4 Node.js SDK
[](https://github.com/iMuFeng/gt4-node-sdk/actions)
[](https://www.npmjs.com/package/gt4-node-sdk)
## Installation
Install the library with `npm install gt4-node-sdk` or `yarn add gt4-node-sdk`
## Usage
```js
import { GeeTest } from 'gt4-node-sdk'
const gt = new GeeTest({
captchaId: 'your_id',
captchaKey: 'your_key'
})
const { result, reason } = await gt.validate({
lotNumber: 'your_lot_number',
captchaOutput: 'your_captcha_output',
passToken: 'your_pass_token',
genTime: 'your_gen_time'
})
if (result === 'success') {
console.log('success')
} else {
console.log('fail: %s', reason)
}
```
## MIT license