Official API
- Package version: 0.0.1
NodeJS 8.11.4+
To install this package you must have NodeJS installed, please follow those instructions for your OS before attempting to use this package.
Install via NPM (easiest method).
npm install --save @variably/uncaptcha-nodeThen import the package:
const uncaptchaNode = require('@variably/uncaptcha-node');Please follow the installation procedure and then you may run any of the following:
const uncaptchaNode = require('@variably/uncaptcha-node');
(async() => {
const api_client = new uncaptchaNode.ApiClient({
apiTimeout: <Number|Optional|Default:10000>,
apiUrl: <String|Optional|Default:'https://api.uncaptcha.com'>,
privateKey: <String|Required>
});
const visitorObject = {
ip: <String|Recommended>,
'user-agent': <String|Recommended>,
'uncaptcha-token': <String|Required>
};
const verified_response = await api_client.validateUncaptchaResponse(visitorObject);
if(verified_response && verified_response.body && verified_response.body == 'true'){
console.log('user verified');
}else if(verified_response){
console.log('user failed to verify')
}else{
console.log('failed to verify user');
}
})().catch(console.error);All endpoints require authorization.
Variably