const vCaptcha = require('vcaptcha-stateless')({
secret: 'secret'
});
const captcha = vCaptcha.create({
userId: 'userId'
});
const guess = [0, 1];
// SOLVE CAPTCHA
vCaptcha.solve({
key: captcha.key,
solution: guess
}, (valid, newCaptcha) => {
console.log(valid ? 'Solved, no need for a new captcha' : 'Failed, sending new captcha', newCaptcha);
});