AZcaptcha for Go
Context-aware client, typed errors with errors.Is sentinels.
go get github.com/azcaptcha/azcaptcha-go
Quickstart
Go
import azcaptcha "github.com/azcaptcha/azcaptcha-go"
client, err := azcaptcha.New("YOUR_API_KEY", azcaptcha.Config{})
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
token, err := client.SolveRecaptchaV2(ctx,
"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
"https://example.com/login", nil)
Examples
Three captcha types, three snippets
Go
token, err := client.SolveRecaptchaV2(ctx, sitekey, pageurl, nil)
token, err = client.SolveRecaptchaV2(ctx, sitekey, pageurl,
&azcaptcha.RecaptchaV2Options{Invisible: true})
Go
token, err := client.SolveTurnstile(ctx, "0x4AAAAAAA...", "https://example.com/", nil)
token, err = client.SolveHCaptcha(ctx, "SITEKEY", "https://example.com/", nil)
Go
// bytes, file path or base64
answer, err := client.SolveImageFile(ctx, "captcha.png", nil)
All snippets assume YOUR_API_KEY is set and a client named client exists.
Polling timeouts and retry behaviour are handled by the SDK.