Node TwoCaptcha

CAPTCHAFORUM

Administrator
6d58ce9924[1].png


Node TwoCaptcha is a Javascript package for 2Captcha - 2Captcha.com.

Installation
Just run:

npm install @infosimples/node_two_captcha
JSDoc documentation can be found at https://infosimples.github.io/node_two_captcha/

Create a client
Code:
// Import module
const Client = require('@infosimples/node_two_captcha');

// Declare your client
client = new Client('your_2captcha_key', {
                    timeout: 60000,
                    polling: 5000,
                    throwErrors: false});

The first parameter of the TwoCaptchaClient constructor is your API key from 2Captcha. The other parameters are:
  • timeout: Time (milliseconds) to wait before giving up on waiting for a captcha solution.
  • polling: Time (milliseconds) between polls to 2captcha server. 2Captcha documentation suggests this time to be at least 5 seconds, or you might get blocked.
  • throwErrors: Whether the client should throw errors or just log the errors.