Golang Module for 2Captcha API

CAPTCHAFORUM

Administrator
1655203615204.png

The easiest way to quickly integrate 2Captcha into your code to automate solving of any type of captcha.

Installation
To install the api client, use this:
go get -u github.com/2captcha/2captcha-go

Configuration
Client instance can be created like this:
Code:
client := api2captcha.NewClient("YOUR_API_KEY")
There are few options that can be configured:

client.SoftId = 123
client.Callback = "https://your.site/result-receiver"
client.DefaultTimeout = 120
client.RecaptchaTimeout = 600
client.PollingInterval = 100

Example below shows a basic solver call example with error handling.
Code:
cap := api2captcha.Normal{
   File: "/path/to/normal.jpg",
}

code, err := client.Solve(cap.ToRequest())
if err != nil {
   log.Fatal(err);
}
fmt.Println("code "+code)

Documentation https://github.com/2captcha/2captcha-go