Go to file
2024-11-18 18:01:18 +00:00
ezcaptcha.go first commit 2024-10-12 01:32:31 +01:00
go.mod initial commit 2024-11-18 17:54:34 +00:00
LICENSE first commit 2024-10-12 01:32:31 +01:00
README.md updated read me 2024-11-18 18:01:18 +00:00
requests.go first commit 2024-10-12 01:32:31 +01:00
tasks.go first commit 2024-10-12 01:32:31 +01:00
types.go first commit 2024-10-12 01:32:31 +01:00

EzCaptcha Client Go

Supported Captchas

  • AkamaiWeb
  • AkamaiBMP
  • HCaptcha + Enterprise
  • ReCaptchaV2 + Enterprise
  • ReCaptchaV3 + Enterprise

Installing

go get -u autoace.su/samjblack/ezcaptcha-client-go

Usage

client, err := ezcaptcha.NewClient("your-api-key", "", 0)
if err != nil {
    log.Fatal(err)
}
task, err := client.NewReCaptchaV2Task(&ezcaptcha.ReCaptchaV2{
// For availabe types please refer to ezcaptcha's docs (https://ezcaptcha.atlassian.net/wiki/spaces/IS/pages/7045121/EzCaptcha+API+Docs+English)
    Type:        "ReCaptchaV2TaskProxyless",
    WebsiteURL:  "https://www.google.com/recaptcha/api2/demo",
    WebsiteKey:  "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
    IsInvisible: false,
})
if err != nil {
    log.Fatal(err)
}
result, err := client.GetResult(task)
if err != nil {
    log.Fatal(err)
}
fmt.Println(result.Solution.GRecaptchaResponse)     

AkamaiBMP Example

client, err := ezcaptcha.NewClient("your-api-key", "", 0)
if err != nil {
    log.Fatal(err)
}
result, err := client.SolveAkamaiBMP(&ezcaptcha.AkamaiBMP{
    Type:     "AkamaiBMPTaskProxyless",
    BundleID: "example.bundle.id",
    Device:   "ios",
    Version:  "3.3.5",
})
if err != nil {
    log.Fatal(err)
}
fmt.Println(result.Solution.Sensor)