ForeverTools.Captcha 1.0.1

dotnet add package ForeverTools.Captcha --version 1.0.1
                    
NuGet\Install-Package ForeverTools.Captcha -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ForeverTools.Captcha" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ForeverTools.Captcha" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="ForeverTools.Captcha" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ForeverTools.Captcha --version 1.0.1
                    
#r "nuget: ForeverTools.Captcha, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ForeverTools.Captcha@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ForeverTools.Captcha&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=ForeverTools.Captcha&version=1.0.1
                    
Install as a Cake Tool

ForeverTools.Captcha

Multi-provider captcha solving for .NET. Supports 2Captcha, CapSolver, and Anti-Captcha with a unified API.

NuGet

Features

  • Multiple Providers - 2Captcha, CapSolver, Anti-Captcha
  • Unified API - Same interface for all providers
  • All Captcha Types - reCAPTCHA v2/v3, hCaptcha, Turnstile, FunCaptcha, Image
  • ASP.NET Core Ready - Built-in dependency injection
  • Async/Await - Fully asynchronous
  • Multi-Target - .NET 8, .NET 6, .NET Standard 2.0

Quick Start

Install

dotnet add package ForeverTools.Captcha

Solve a Captcha

using ForeverTools.Captcha;

// Create client for your preferred provider
var client = CaptchaClient.For2Captcha("your-api-key");
// or: var client = CaptchaClient.ForCapSolver("your-api-key");
// or: var client = CaptchaClient.ForAntiCaptcha("your-api-key");

// Solve reCAPTCHA v2
var result = await client.SolveReCaptchaV2Async(
    "https://example.com/page",
    "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
);

if (result.Success)
{
    Console.WriteLine($"Token: {result.Solution}");
}

Supported Captcha Types

reCAPTCHA v2

var result = await client.SolveReCaptchaV2Async(
    websiteUrl: "https://example.com",
    siteKey: "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
    invisible: false
);

reCAPTCHA v3

var result = await client.SolveReCaptchaV3Async(
    websiteUrl: "https://example.com",
    siteKey: "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
    action: "login",
    minScore: 0.5
);

hCaptcha

var result = await client.SolveHCaptchaAsync(
    websiteUrl: "https://example.com",
    siteKey: "a5f74b19-9e45-40e0-b45d-47ff91b7a6c2"
);

Cloudflare Turnstile

var result = await client.SolveTurnstileAsync(
    websiteUrl: "https://example.com",
    siteKey: "0x4AAAAAAABS7vwvV6VFfMcD"
);

Image Captcha

// From base64
var result = await client.SolveImageAsync(imageBase64);

// From bytes
var result = await client.SolveImageAsync(imageBytes);

FunCaptcha / Arkose Labs

var result = await client.SolveFunCaptchaAsync(
    websiteUrl: "https://example.com",
    publicKey: "A2A14B1D-1AF3-C791-9BBC-EE1C98E84A77"
);

Multi-Provider Setup

Configure multiple providers for failover or comparison:

var options = new CaptchaOptions
{
    DefaultProvider = CaptchaProvider.TwoCaptcha,
    TwoCaptchaApiKey = "key1",
    CapSolverApiKey = "key2",
    AntiCaptchaApiKey = "key3"
};

var client = new CaptchaClient(options);

// Use specific provider
var result = await client.SolveReCaptchaV2Async(url, siteKey,
    provider: CaptchaProvider.CapSolver);

ASP.NET Core Integration

// Program.cs
builder.Services.AddForeverToolsCaptcha("your-api-key");

// Or with full configuration
builder.Services.AddForeverToolsCaptcha(options =>
{
    options.DefaultProvider = CaptchaProvider.TwoCaptcha;
    options.TwoCaptchaApiKey = "key1";
    options.CapSolverApiKey = "key2";
    options.TimeoutSeconds = 120;
});

// Or from appsettings.json
builder.Services.AddForeverToolsCaptcha(builder.Configuration);
// appsettings.json
{
  "Captcha": {
    "DefaultProvider": "TwoCaptcha",
    "TwoCaptchaApiKey": "your-key",
    "TimeoutSeconds": 120
  }
}

Check Balance

var balance = await client.GetBalanceAsync();
Console.WriteLine($"Balance: ${balance.Balance}");

// All configured providers
var balances = await client.GetAllBalancesAsync();

Report Incorrect Solution

if (!solutionWorked)
{
    await client.ReportIncorrectAsync(result.TaskId, result.Provider);
}

Requirements

  • .NET 8.0, .NET 6.0, or .NET Standard 2.0 compatible framework
  • API key from at least one provider

License

MIT License - see LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1 420 12/8/2025
1.0.0 414 12/8/2025