AZcaptcha.Sdk
1.0.0
dotnet add package AZcaptcha.Sdk --version 1.0.0
NuGet\Install-Package AZcaptcha.Sdk -Version 1.0.0
<PackageReference Include="AZcaptcha.Sdk" Version="1.0.0" />
<PackageVersion Include="AZcaptcha.Sdk" Version="1.0.0" />
<PackageReference Include="AZcaptcha.Sdk" />
paket add AZcaptcha.Sdk --version 1.0.0
#r "nuget: AZcaptcha.Sdk, 1.0.0"
#:package AZcaptcha.Sdk@1.0.0
#addin nuget:?package=AZcaptcha.Sdk&version=1.0.0
#tool nuget:?package=AZcaptcha.Sdk&version=1.0.0
AZcaptcha .NET SDK
Official .NET client for AZcaptcha — image captchas, reCAPTCHA v2/v3, hCaptcha, Cloudflare Turnstile, FunCaptcha and GeeTest.
- Async/await throughout (
Task),CancellationTokenon every call. - Targets
netstandard2.0andnet8.0. - 2Captcha-compatible surface (
SolveAsync,ResultAsync,BalanceAsync,ReportBadAsync) plus the modern JSON API (CreateTaskAsync,GetTaskResultAsync). - Typed
AzcaptchaExceptionwithCode,CategoryandRetryable(spec-v1.0.0). - Contract polling with
NO_SLOTbackoff and per-type deadlines.
Install
dotnet add package AZcaptcha.Sdk
Quickstart
using Azcaptcha;
var client = new AzcaptchaClient("YOUR_API_KEY");
// reCAPTCHA v2
string token = await client.SolveRecaptchaV2Async(
"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
"https://example.com/login");
// Image captcha (bytes, file path or base64/data: URI)
string answer = await client.SolveImageFileAsync("captcha.png");
// hCaptcha / Turnstile
string h = await client.SolveHCaptchaAsync("SITEKEY", "https://example.com/");
string t = await client.SolveTurnstileAsync("0x4AAAAAAA...", "https://example.com/");
Low-level (2Captcha style)
string taskId = await client.SubmitAsync("userrecaptcha", new Dictionary<string, object?>
{
["googlekey"] = "SITEKEY",
["pageurl"] = "https://example.com/"
});
string token = await client.WaitResultAsync(taskId, TimeSpan.FromSeconds(300));
Modern JSON API
int taskId = await client.CreateTaskAsync("RecaptchaV2TaskProxyless",
new Dictionary<string, object?>
{
["websiteURL"] = "https://example.com/login",
["websiteKey"] = "SITEKEY"
});
var solution = await client.WaitTaskResultAsync(taskId);
Console.WriteLine(solution["gRecaptchaResponse"].GetString());
Proxies
await client.SolveRecaptchaV2Async(sitekey, pageurl, invisible: false, enterprise: false,
parameters: new Dictionary<string, object?>
{
["proxy"] = "socks5://user:pass@1.2.3.4:1080"
});
Any accepted spelling works (scheme://user:pass@host:port,
host:port:user:pass, user:pass@host:port). The scheme is never sent
upstream; proxytype is derived (http/https → HTTP, socks4, socks5).
Errors
try
{
string token = await client.SolveTurnstileAsync(sitekey, pageurl);
}
catch (AzcaptchaException error) when (error.Category == ErrorCategory.Balance)
{
// ERROR_ZERO_BALANCE
}
catch (AzcaptchaException error) when (error.Category == ErrorCategory.Capacity)
{
// ERROR_NO_SLOT_AVAILABLE — retry with backoff
}
WaitResultAsync retries only codes marked retryable and backs off 10s ×1.5 up
to 60s.
Timeouts
Defaults match server settings: image 120s, hCaptcha 120s, Turnstile 180s,
reCAPTCHA and others 300s. Override with
client.SolveAsync(method, parameters, TimeSpan.FromSeconds(90)).
Custom transport
var client = new AzcaptchaClient("KEY", new AzcaptchaConfig
{
Transport = myTransport,
Delay = (duration, token) => Task.Delay(duration, token)
});
ITransport requires PostFormAsync, PostJsonAsync and GetAsync.
Links
- API contract: https://github.com/AZcaptcha/sdk-spec
- Docs: https://azcaptcha.com/docs
- C# guide: https://azcaptcha.com/lang/csharp
- Changelog: CHANGELOG.md
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.5)
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 5 | 11/18/2026 |