Closed shishank-bsc closed 1 month ago
TwoCaptcha.TwoCaptcha solver = new TwoCaptcha.TwoCaptcha(ApiKey); I got same your issue. I should try it!
namespace ConsoleApp1
{
using TwoCaptcha;
using TwoCaptcha.Captcha;
using TwoCaptcha.Exceptions;
class Program
{
static void Main(string[] args)
{
TwoCaptcha solver = new TwoCaptcha("55555555555555555555");
Text captcha = new Text("If tomorrow is Saturday, what day is today?");
try
{
solver.Solve(captcha).Wait();
Console.WriteLine("Captcha solved: " + captcha.Code);
}
catch (AggregateException e)
{
Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message);
}
}
}
}
I am trying to integrate 2Captcha service in my .Net6 Application.
I have installed this nuget package: https://www.nuget.org/packages/2captcha-csharp/
I added the namespace: using TwoCaptcha.Captcha;
But I am not able to instantiate the object:
TwoCaptcha solver = new TwoCaptcha('YOUR_API_KEY'); reCAPTCHA captcha = new reCAPTCHA(); Getting error here.
How can I resolve this?
https://stackoverflow.com/questions/77986229/cannot-instantiate-twocaptcha-object-in-net-6