

We'll install several dependencies like axios, 2captcha. We need to create the file using the command below: touch index.js

In step 1, we initialized npm with the command npm init -y, which automatically created a package.json. Step 1 - Create a directory and initialize npmĬreate a directory and initialize npm by typing the following command: won't work if you don't have Visual Studio Code installed on your system. Open Visual Studio Code by navigating to a directory of your choice on your machine and opening it on the terminal. To get started, we'll need to set up our project.

We need to sign up on 2Captcha 's platform to create an API Key for making requests.Īfter completing the signup process, we need to pay a token starting at 0.5 USD for 1000 completed CAPTCHAs to request our application.Īs displayed below, we now have access to API Key on our dashboard, which we will use later in this tutorial. Once you obtain the request ID, you must send requests to the resulting endpoint, which we will query periodically until the solution is complete. The first request sends the data needed to solve the CAPTCHA and returns a request ID (or a base64-ed image in the case of image CAPTCHAs). The primary goal of 2Captcha is for human employees to solve CAPTCHAs quickly and accurately.ĢCaptcha solves a variety of CAPTCHA styles using essentially the same two API endpoints.
