AutoSolveClient 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package AutoSolveClient --version 1.0.1
NuGet\Install-Package AutoSolveClient -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="AutoSolveClient" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AutoSolveClient --version 1.0.1
#r "nuget: AutoSolveClient, 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.
// Install AutoSolveClient as a Cake Addin
#addin nuget:?package=AutoSolveClient&version=1.0.1

// Install AutoSolveClient as a Cake Tool
#tool nuget:?package=AutoSolveClient&version=1.0.1

AYCD AutoSolve C# Client

Client for connecting to the AYCD AutoSolve network

Getting Started

For an example instantiation, take a look at testclient.cs.

Dependencies

Nuget packages auto-installed with client:

PubSub (>= 4.0.0)
RabbitMQ.Client (>= 5.1.2)
System.Collections.NonGeneric (>= 4.3.0)
System.Json (>= 4.7.0)
System.Runtime.Serialization.Json (>= 4.3.0)
System.Text.Json (>= 4.7.1)

Initialization

Integrate in a few simple steps. First, install the NuGet package in package manager, by searching for:

AutoSolveClient

Then, import the module into your application:

using AutoSolveClient

Next, instantiate the AutoSolve class.

AutoSolve client = new AutoSolve(
    "accessToken",
    "apiKey",
    "clientId",
    debug (boolean)
)

Where:

  • accessToken is the user's access token
  • apiKey is the user's api key generated for your program
  • clientKey is the unique client identifier given to you by AYCD
  • debug enables more thorough console logging for actions occuring. True for logging

To better integrate with your logging, debug emits an event (if true) to a listener, which you must create. An example:

this.client.ee.Subscribe<String>(message =>
{
    //do what you want with the message here.
	Console.WriteLine(message)
});

Then, you must create an event listener to handle responses sent from AutoSolve.

An example listener:


this.client.ee.Subscribe<AutoSolveResponse>(responseObject =>
{
	handleAutosolveResponse(responseObject)
});


void handleAutosolveResponse(AutoSolveResponse responseObject) {
    Console.WriteLine("Task ID :: " + responseObject.taskId)
    Console.WriteLine("Site Key :: " + responseObject.siteKey)
    Console.WriteLine("Token :: " + responseObject.token)
    Console.WriteLine("Created At :: " + responseObject.createdAt)
    Console.WriteLine("Version :: " + responseObject.version)
    Console.WriteLine("Action :: " + responseObject.action)
}

Finally, you can now begin instantiating connections to AutoSolve by calling:

client.Init();

Request Data

You must send requests in the following format, using the AutoSolveMessage class get/set instantiatiors:

AutoSolveMessage message = new AutoSolveMessage() 
{
    //An ID for the task requesting captcha. This can be whatever.
    taskId = "task1", 

    //Url of the site which the captcha was received
    url = "https://recaptcha.autosolve.io/version/1", 

    //Public ReCaptcha key for a given site
    siteKey = "6Ld_LMAUAAAAAOIqLSy5XY9-DUKLkAgiDpqtTJ9b", 

    //Api Key your customer needs from AYCD Autosolve
    apiKey = autoSolve.apiKey, 

    //Map object for parameters for ReCaptcha v2, in the grecaptcha.render method
    renderParameters = renderMap

    //Version of ReCaptcha
    //Options:
    /**
        V2_CHECKBOX is 0
        V2_INVISIBLE is 1
        V3_SCORE is 2
        */
    version = "0", 

    //Only required for ReCaptcha V3. Site-specific value. More info:
    //https://developers.google.com/recaptcha/docs/v3#actions
    action = "", 

    //Minimum score required to pass the recaptcha
    minScore = 0, 

    //Proxy used in the task which got the captcha
    proxy = "", 

    //Is proxy required, some captcha services don't support use of proxies
    //and will not be used if a proxy is necessary for captcha processing.
    //Default is false
    proxyRequired = false,

    //User agent used in the request (optional)
    userAgent = "",

    //Cookies in the request (optional)
    cookies = ""
}

Handling Responses

You will receive responses as an AutoSolveResponse object, with the following fields :

{
    taskId
    siteKey
    token
    createdAt
    version
    action
}

Sending Requests

Lastly, to send a request, use the following function, where message is of type AutoSolveMessage:

AutoSolveMessage message = new AutoSolveMessage() { taskId = "3", url = "https://google.com", ... }
client.sendMessage(message)

This will return true if successful, or false if unsuccessful. It is blocking and should be handled on another thread if possible. In the case that it is unsuccessful, use the following which will wait, attempt resend, and if failed push the message to a backlog to resend upon reconnection:

Error Handling

AutoSolve C# has automatic error handling and recovery, but will throw an exception if:

  • Client Key is invalid
  • API Key is invalid
  • Access Token is invalid
  • Connection error occurs AND recovery is not possible

Errors will be thrown as error object class AutoSolveException, with the following types:

  • INVALID_CLIENT_ID
  • INVALID_API_KEY_OR_ACCESS_TOKEN
  • INPUT_VALUE_ERROR

License

This project is licensed under the MIT License

Product 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 was computed.  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. 
.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
2.1.3 1,832 8/21/2020
2.1.2 556 7/3/2020
2.1.1 535 7/3/2020
2.1.0 475 4/30/2020
2.0.9 426 4/28/2020
2.0.8 404 4/27/2020
2.0.7 410 4/27/2020
2.0.6 423 4/25/2020
2.0.5 414 4/24/2020
2.0.4 409 4/23/2020
2.0.3 415 4/23/2020
2.0.2 411 4/22/2020
2.0.1 490 4/21/2020
2.0.0 414 4/21/2020
1.2.0 442 4/20/2020
1.1.9 471 4/20/2020
1.1.8 486 4/20/2020
1.1.7 445 4/9/2020
1.1.6 563 4/7/2020
1.1.5 422 4/2/2020
1.1.4 433 3/31/2020
1.1.3 446 3/31/2020
1.1.2 456 3/31/2020
1.1.1 444 3/31/2020
1.1.0 498 3/30/2020
1.0.9 519 3/30/2020
1.0.8 463 3/22/2020
1.0.7 462 3/20/2020
1.0.6 445 3/19/2020
1.0.5 457 3/19/2020
1.0.4 424 3/18/2020
1.0.3 435 3/18/2020
1.0.2 448 3/18/2020
1.0.1 447 3/9/2020
1.0.0 500 3/7/2020
0.0.4 544 3/7/2020
0.0.3 511 3/6/2020
0.0.2 496 3/6/2020
0.0.1 491 3/6/2020