{"id":20050148,"url":"https://github.com/2captcha/2captcha-csharp","last_synced_at":"2025-04-05T15:09:30.503Z","repository":{"id":47096170,"uuid":"275798664","full_name":"2captcha/2captcha-csharp","owner":"2captcha","description":"C# library for easy integration with the API of 2captcha captcha solving service to bypass recaptcha, funcaptcha, geetest and solve any other captchas.","archived":false,"fork":false,"pushed_at":"2024-12-04T10:43:07.000Z","size":446,"stargazers_count":94,"open_issues_count":5,"forks_count":27,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T14:12:41.151Z","etag":null,"topics":["2captcha","anti-captcha","anticaptcha","bypass-invisible-recaptcha","bypass-on-captcha-recaptcha","bypass-recaptcha-v2","bypasscaptcha","captcha-breaking","captcha-bypass","captcha-recognition","captcha-services-for-recaptcha-v2","captcha-solver","captcha-solving","deathbycaptcha","google-recaptcha-solver","recaptcha-bypass-script","recaptcha-solver","recaptcha-solver-csharp","recaptcha-v2-captcha-solver"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/2captcha-csharp","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2captcha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-29T11:47:56.000Z","updated_at":"2025-01-21T02:32:33.000Z","dependencies_parsed_at":"2024-07-24T16:50:17.079Z","dependency_job_id":"ba674fb1-e12c-4001-bdd4-7882f9d87755","html_url":"https://github.com/2captcha/2captcha-csharp","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2captcha%2F2captcha-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2captcha%2F2captcha-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2captcha%2F2captcha-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2captcha%2F2captcha-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2captcha","download_url":"https://codeload.github.com/2captcha/2captcha-csharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353749,"owners_count":20925329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2captcha","anti-captcha","anticaptcha","bypass-invisible-recaptcha","bypass-on-captcha-recaptcha","bypass-recaptcha-v2","bypasscaptcha","captcha-breaking","captcha-bypass","captcha-recognition","captcha-services-for-recaptcha-v2","captcha-solver","captcha-solving","deathbycaptcha","google-recaptcha-solver","recaptcha-bypass-script","recaptcha-solver","recaptcha-solver-csharp","recaptcha-v2-captcha-solver"],"created_at":"2024-11-13T11:54:35.765Z","updated_at":"2025-04-05T15:09:30.484Z","avatar_url":"https://github.com/2captcha.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://github.com/2captcha/2captcha-python\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/37e1d860-033b-4cf3-a158-468fc6b4debc\" width=\"82\" height=\"30\" alt=\"python library\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/2captcha/2captcha-javascript\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/e81e9714-7bd8-40f9-971c-b08bf9da6b97\" width=\"36\" height=\"30\" alt=\"javascript library\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/2captcha/2captcha-go\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/ab22182e-6cb2-41fa-91f4-d5e89c6d7c6f\" width=\"63\" height=\"30\" alt=\"go library\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/2captcha/2captcha-ruby\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/0270d56f-79b0-4c95-9b09-4de89579914b\" width=\"75\" height=\"30\" alt=\"ruby library\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/2captcha/2captcha-cpp\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/36de8512-acfd-44fb-bb1f-b7c793a3f926\" width=\"45\" height=\"30\" alt=\"cpp library\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/2captcha/2captcha-php\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/e8797843-3f61-4fa9-a155-ab0b21fb3858\" width=\"52\" height=\"30\" alt=\"php library\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/2captcha/2captcha-java\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/a3d923f6-4fec-4c07-ac50-e20da6370911\" width=\"50\" height=\"30\" alt=\"java library\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/2captcha/2captcha-csharp\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/4dff0a3e-0ed7-46bd-8c59-4b95451aa54d\" width=\"38\" height=\"30\" alt=\"csharp library\"\u003e\u003c/a\u003e\n\n# C# Module for 2Captcha API (captcha solver)\nThe easiest way to quickly integrate [2Captcha] into your code to automate solving of any types of captcha.\nExamples of API requests for different captcha types are available on the [C# captcha solver](https://2captcha.com/lang/csharp) page.\n\n- [C# Module for 2Captcha API (captcha solver)](#c-module-for-2captcha-api-captcha-solver)\n  - [Installation](#installation)\n  - [Configuration](#configuration)\n    - [TwoCaptcha instance options](#twocaptcha-instance-options)\n  - [Solve captcha](#solve-captcha)\n    - [Captcha options](#captcha-options)\n    - [Basic example](#basic-example)\n    - [Normal Captcha](#normal-captcha)\n    - [Text Captcha](#text-captcha)\n    - [reCAPTCHA v2](#recaptcha-v2)\n    - [reCAPTCHA v3](#recaptcha-v3)\n    - [FunCaptcha](#funcaptcha)\n    - [GeeTest](#geetest)\n    - [GeeTest v4](#geetest-v4)\n    - [KeyCaptcha](#keycaptcha)\n    - [Capy](#capy)\n    - [Grid](#grid)\n    - [Canvas](#canvas)\n    - [ClickCaptcha](#clickcaptcha)\n    - [Rotate](#rotate)\n    - [Audio Captcha](#audio-captcha)\n    - [Yandex](#yandex)\n    - [Lemin Cropped Captcha](#lemin-cropped-captcha)\n    - [Cloudflare Turnstile](#cloudflare-turnstile)\n    - [Amazon WAF](#amazon-waf)\n    - [Friendly Captcha](#friendly-captcha)\n    - [MTCaptcha](#mtcaptcha)\n    - [Cutcaptcha](#cutcaptcha)\n    - [CyberSiARA](#cybersiara)\n    - [DataDome](#datadome)\n    - [atbCAPTCHA](#atbcaptcha)\n    - [Tencent](#tencent)\n  - [Other methods](#other-methods)\n    - [send / getResult](#send--getresult)\n    - [balance](#balance)\n    - [report](#report)\n  - [Proxies](#proxies)\n  - [Error handling](#error-handling)\n  - [Get in touch](#get-in-touch)\n  - [Join the team 👪](#join-the-team-)\n- [License](#license)\n    - [Graphics and Trademarks](#graphics-and-trademarks)\n\n## Installation\nInstall nuget package from [nuget]:\n\n`dotnet add package 2captcha-csharp`\n\n## Configuration\n`TwoCaptcha` instance can be created like this:\n```csharp\nTwoCaptcha solver = new TwoCaptcha('YOUR_API_KEY');\n```\nAlso there are few options that can be configured:\n```csharp\nsolver.SoftId = 123;\nsolver.Callback = \"https://your.site/result-receiver\";\nsolver.DefaultTimeout = 120;\nsolver.RecaptchaTimeout = 600;\nsolver.PollingInterval = 10;\n```\n\n### TwoCaptcha instance options\n\n| Option           | Default value | Description                                                                                                                                        |\n| ---------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |\n| softId           | 4582             | your software ID obtained after publishing in [2captcha software catalog]                                                                          |\n| callback         | -             | URL of your web-sever that receives the captcha recognition result. The URl should be first registered in [pingback settings] of your account      |\n| defaultTimeout   | 120           | Polling timeout in seconds for all captcha types except reCAPTCHA. Defines how long the module tries to get the answer from `res.php` API endpoint |\n| recaptchaTimeout | 600           | Polling timeout for reCAPTCHA in seconds. Defines how long the module tries to get the answer from `res.php` API endpoint                          |\n| pollingInterval  | 10            | Interval in seconds between requests to `res.php` API endpoint, setting values less than 5 seconds is not recommended                              |\n\n\u003e  **IMPORTANT:** once `Callback` is defined for `TwoCaptcha` instance, all methods return only the captcha ID and DO NOT poll the API to get the result. The result will be sent to the callback URL.\nTo get the answer manually use [getResult method](#send--getresult)\n\n## Solve captcha\nWhen you submit any image-based captcha use can provide additional options to help 2captcha workers to solve it properly.\n\n### Captcha options\n| Option        | Default Value | Description                                                                                        |\n| ------------- | ------------- | -------------------------------------------------------------------------------------------------- |\n| numeric       | 0             | Defines if captcha contains numeric or other symbols [see more info in the API docs][post options] |\n| minLength     | 0             | minimal answer length                                                                              |\n| maxLength     | 0             | maximum answer length                                                                              |\n| phrase        | 0             | defines if the answer contains multiple words or not                                               |\n| caseSensitive | 0             | defines if the answer is case sensitive                                                            |\n| calc          | 0             | defines captcha requires calculation                                                               |\n| lang          | -             | defines the captcha language, see the [list of supported languages]                                |\n| hintImg       | -             | an image with hint shown to workers with the captcha                                               |\n| hintText      | -             | hint or task text shown to workers with the captcha                                                |\n\nBelow you can find basic examples for every captcha type. Check out [examples directory] to find more examples with all available options.\n\n### Basic example\nExample below shows a basic solver call example with error handling.\n\n```csharp\nNormal captcha = new Normal();\ncaptcha.SetFile(\"path/to/captcha.jpg\");\ncaptcha.SetMinLen(4);\ncaptcha.SetMaxLen(20);\ncaptcha.SetCaseSensitive(true);\ncaptcha.SetLang(\"en\");\n\ntry\n{\n    await solver.Solve(captcha);\n    Console.WriteLine(\"Captcha solved: \" + captcha.Code);\n}\ncatch (Exception e)\n{\n    Console.WriteLine(\"Error occurred: \" + e.Message);\n}\n```\n\n### Normal Captcha\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#solving_normal_captcha)\u003c/sup\u003e\n\nTo bypass a normal captcha (distorted text on image) use the following method. This method also can be used to recognize any text on the image.\n\n```csharp\nNormal captcha = new Normal();\ncaptcha.SetFile(\"path/to/captcha.jpg\");\ncaptcha.SetNumeric(4);\ncaptcha.SetMinLen(4);\ncaptcha.SetMaxLen(20);\ncaptcha.SetPhrase(true);\ncaptcha.SetCaseSensitive(true);\ncaptcha.SetCalc(false);\ncaptcha.SetLang(\"en\");\ncaptcha.SetHintImg(new FileInfo(\"path/to/hint.jpg\"));\ncaptcha.SetHintText(\"Type red symbols only\");\n```\n\n### Text Captcha\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#solving_text_captcha)\u003c/sup\u003e\n\nThis method can be used to bypass a captcha that requires to answer a question provided in clear text.\n\n```csharp\nText captcha = new Text();\ncaptcha.SetText(\"If tomorrow is Saturday, what day is today?\");\ncaptcha.SetLang(\"en\");\n```\n\n### reCAPTCHA v2\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#solving_recaptchav2_new)\u003c/sup\u003e\n\nUse this method to solve reCAPTCHA V2 and obtain a token to bypass the protection.\n\n```csharp\nReCaptcha captcha = new ReCaptcha();\ncaptcha.SetSiteKey(\"6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-\");\ncaptcha.SetUrl(\"https://mysite.com/page/with/recaptcha\");\ncaptcha.SetInvisible(true);\ncaptcha.SetEnterprise(false);\ncaptcha.SetAction(\"verify\");\ncaptcha.SetProxy(\"HTTPS\", \"login:password@IP_address:PORT\");\n```\n### reCAPTCHA v3\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#solving_recaptchav3)\u003c/sup\u003e\n\nThis method provides reCAPTCHA V3 solver and returns a token.\n\n```csharp\nReCaptcha captcha = new ReCaptcha();\ncaptcha.SetSiteKey(\"6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-\");\ncaptcha.SetUrl(\"https://mysite.com/page/with/recaptcha\");\ncaptcha.SetVersion(\"v3\");\ncaptcha.SetEnterprise(false);\ncaptcha.SetDomain(\"google.com\");\ncaptcha.SetAction(\"verify\");\ncaptcha.SetScore(0.3);\ncaptcha.SetProxy(\"HTTPS\", \"login:password@IP_address:PORT\");\n```\n\n### FunCaptcha\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#solving_funcaptcha_new)\u003c/sup\u003e\n\nFunCaptcha (Arkoselabs) solving method. Returns a token.\n\n```csharp\nFunCaptcha captcha = new FunCaptcha();\ncaptcha.SetSiteKey(\"69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC\");\ncaptcha.SetUrl(\"https://mysite.com/page/with/funcaptcha\");\ncaptcha.SetSUrl(\"https://client-api.arkoselabs.com\");\ncaptcha.SetUserAgent(\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36\");\ncaptcha.SetData(\"anyKey\", \"anyValue\");\ncaptcha.SetProxy(\"HTTPS\", \"login:password@IP_address:PORT\");\n```\n\n### GeeTest\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#solving_geetest)\u003c/sup\u003e\n\nMethod to solve GeeTest puzzle captcha. Returns a set of tokens as JSON.\n\n```csharp\nGeeTest captcha = new GeeTest();\ncaptcha.SetGt(\"f2ae6cadcf7886856696502e1d55e00c\");\ncaptcha.SetApiServer(\"api-na.geetest.com\");\ncaptcha.SetChallenge(\"12345678abc90123d45678ef90123a456b\");\ncaptcha.SetUrl(\"https://mysite.com/captcha.html\");\ncaptcha.SetProxy(\"HTTPS\", \"login:password@IP_address:PORT\");\n```\n\n### GeeTest v4\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#geetest-v4)\u003c/sup\u003e\n\nMethod to solve GeeTest v4 puzzle captcha. Returns a set of tokens as JSON.\n\n```csharp\nGeeTestV4 captcha = new GeeTestV4();\ncaptcha.SetCaptchaId(\"72bf15796d0b69c43867452fea615052\");\ncaptcha.SetChallenge(\"12345678abc90123d45678ef90123a456b\");\ncaptcha.SetUrl(\"https://mysite.com/captcha.html\");\n```\n\n### KeyCaptcha\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#solving_keycaptcha)\u003c/sup\u003e\n\nToken-based method to solve KeyCaptcha.\n\n```csharp\nKeyCaptcha captcha = new KeyCaptcha();\ncaptcha.SetUserId(10);\ncaptcha.SetSessionId(\"493e52c37c10c2bcdf4a00cbc9ccd1e8\");\ncaptcha.SetWebServerSign(\"9006dc725760858e4c0715b835472f22\");\ncaptcha.SetWebServerSign2(\"2ca3abe86d90c6142d5571db98af6714\");\ncaptcha.SetUrl(\"https://www.keycaptcha.ru/demo-magnetic/\");\ncaptcha.SetProxy(\"HTTPS\", \"login:password@IP_address:PORT\");\n```\n\n### Capy\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#solving_capy)\u003c/sup\u003e\n\nToken-based method to bypass Capy puzzle captcha.\n\n```csharp\nCapy captcha = new Capy();\ncaptcha.SetSiteKey(\"PUZZLE_Abc1dEFghIJKLM2no34P56q7rStu8v\");\ncaptcha.SetUrl(\"https://www.mysite.com/captcha/\");\ncaptcha.SetProxy(\"HTTPS\", \"login:password@IP_address:PORT\");\n```\n\n### Grid\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#grid)\u003c/sup\u003e\n\nGrid method is originally called Old reCAPTCHA V2 method. The method can be used to bypass any type of captcha where you can apply a grid on image and need to click specific grid boxes. Returns numbers of boxes.\n\n```csharp\nGrid captcha = new Grid();\ncaptcha.SetFile(\"path/to/captcha.jpg\");\ncaptcha.SetRows(3);\ncaptcha.SetCols(3);\ncaptcha.SetPreviousId(0);\ncaptcha.SetCanSkip(false);\ncaptcha.SetLang(\"en\");\ncaptcha.SetHintImg(new FileInfo(\"path/to/hint.jpg\"));\ncaptcha.SetHintText(\"Select all images with an Orange\");\n```\n\n### Canvas\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#canvas)\u003c/sup\u003e\n\nCanvas method can be used when you need to draw a line around an object on image. Returns a set of points' coordinates to draw a polygon.\n\n```csharp\nCanvas captcha = new Canvas();\ncaptcha.SetFile(\"path/to/captcha.jpg\");\ncaptcha.SetPreviousId(0);\ncaptcha.SetCanSkip(false);\ncaptcha.SetLang(\"en\");\ncaptcha.SetHintImg(new FileInfo(\"path/to/hint.jpg\"));\ncaptcha.SetHintText(\"Draw around apple\");\n```\n\n### ClickCaptcha\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#coordinates)\u003c/sup\u003e\n\nClickCaptcha (Coordinates) method returns coordinates of points on captcha image. Can be used if you need to click on particular points on the image.\n\n```csharp\nCoordinates captcha = new Coordinates();\ncaptcha.SetFile(\"path/to/captcha.jpg\");\ncaptcha.SetLang(\"en\");\ncaptcha.SetHintImg(new FileInfo(\"path/to/hint.jpg\"));\ncaptcha.SetHintText(\"Select all images with an Orange\");\n```\n\n### Rotate\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#solving_rotatecaptcha)\u003c/sup\u003e\n\nThis method can be used to solve a captcha that asks to rotate an object. Mostly used to bypass FunCaptcha. Returns the rotation angle.\n\n```csharp\nRotate captcha = new Rotate();\ncaptcha.SetFile(\"path/to/captcha.jpg\");\ncaptcha.SetAngle(40);\ncaptcha.SetLang(\"en\");\ncaptcha.SetHintImg(new FileInfo(\"path/to/hint.jpg\"));\ncaptcha.SetHintText(\"Put the images in the correct way up\");\n```\n\n### Audio Captcha\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#audio)\u003c/sup\u003e\n\nThis method can be used to solve a audio captcha (mp3 formats only).\nYou must provide the language as `lang = 'en'`. Supported languages are \"en\", \"ru\", \"de\", \"el\", \"pt\", \"fr\".\n\n```csharp\nAudioCaptcha captcha = new AudioCaptcha();\nbyte[] bytes = File.ReadAllBytes(\"../../resources/audio-en.mp3\");\nstring base64EncodedImage = Convert.ToBase64String(bytes);\ncaptcha.SetBase64(base64EncodedImage);\n```\n\n### Yandex\n\nUse this method to solve Yandex and obtain a token to bypass the protection.\n\n```csharp\nYandex captcha = new Yandex();\ncaptcha.SetSiteKey(\"Y5Lh0tiycconMJGsFd3EbbuNKSp1yaZESUOIHfeV\");\ncaptcha.SetUrl(\"https://rutube.ru\");\n```\n\n### Lemin Cropped Captcha\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#lemin)\u003c/sup\u003e\n\nUse this method to solve Lemin and obtain a token to bypass the protection.\n\n```csharp\nLemin captcha = new Lemin();\ncaptcha.SetCaptchaId(\"CROPPED_d3d4d56_73ca4008925b4f83a8bed59c2dd0df6d\");\ncaptcha.SetApiServer(\"api.leminnow.com\");\ncaptcha.SetUrl(\"http://sat2.aksigorta.com.tr\");\n```\n\n### Cloudflare Turnstile\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#turnstile)\u003c/sup\u003e\n\nUse this method to solve Cloudflare Turnstile and obtain a token to bypass the protection.\n\n```csharp\nTurnstile captcha = new Turnstile();\ncaptcha.SetSiteKey(\"0x4AAAAAAAChNiVJM_WtShFf\");\ncaptcha.SetUrl(\"https://ace.fusionist.io\");\ncaptcha.SetData(\"foo\");\ncaptcha.SetPageData(\"bar\");\ncaptcha.SetAction(\"baz\");\n```\n\n### Amazon WAF\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#amazon-waf)\u003c/sup\u003e\n\nUse this method to solve Amazon WAF Captcha also known as AWS WAF Captcha is a part of Intelligent threat mitigation for Amazon AWS. Returns JSON with the token.\n\n```csharp\nAmazonWaf captcha = new AmazonWaf();\ncaptcha.SetSiteKey(\"AQIDAHjcYu/GjX+QlghicBgQ/7bFaQZ+m5FKCMDnO+vTbNg96AF5H1K/siwSLK7RfstKtN5bAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglg\");\ncaptcha.SetUrl(\"https://non-existent-example.execute-api.us-east-1.amazonaws.com\");\ncaptcha.SetContext(\"test_iv\");\ncaptcha.SetIV(\"test_context\");\n```\n\n### Friendly Captcha\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#friendly-captcha)\u003c/sup\u003e\n\nUse this method to solve Friendly Captcha. Returns a token to bypass the captcha.\n\n\u003e [!IMPORTANT]\n\u003e To successfully use the received token, the captcha widget must not be loaded on the page. To do this, you need to abort request to `/friendlycaptcha/...module.min.js` on the page. When the captcha widget is already loaded on the page, there is a high probability that the received token will not work.\n\n```csharp\nFriendlyCaptcha captcha = new FriendlyCaptcha();\ncaptcha.SetSiteKey(\"2FZFEVS1FZCGQ9\");\ncaptcha.SetUrl(\"https://example.com\");\n```\n\n### MTCaptcha\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#mtcaptcha)\u003c/sup\u003e\n\nUse this method to solve MTCaptcha. Returns a token to bypass the captcha.\n\n```csharp\nMTCaptcha captcha = new MTCaptcha();\ncaptcha.SetSiteKey(\"MTPublic-KzqLY1cKH\");\ncaptcha.SetPageUrl(\"https://2captcha.com/demo/mtcaptcha\");\n```\n\n### Cutcaptcha\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#cutcaptcha)\u003c/sup\u003e\n\nUse this method to solve Cutcaptcha. Returns a token to bypass the captcha.\n\n```csharp\nCutcaptcha captcha = new Cutcaptcha();\ncaptcha.SetMiseryKey(\"a1488b66da00bf332a1488993a5443c79047e752\");\ncaptcha.SetPageUrl(\"https://example.cc/foo/bar.html\");\ncaptcha.SetApiKey(\"SAb83IIB\");\n```\n\n### CyberSiARA\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#cybersiara)\u003c/sup\u003e\n\nUse this method to solve CyberSiARA. Returns a token to bypass the captcha.\n\n```csharp\nCyberSiARA cyberSiARA = new CyberSiARA();\ncyberSiARA.SetMasterUrlId(\"tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv\");\ncyberSiARA.SetPageUrl(\"https://demo.mycybersiara.com/\");\ncyberSiARA.SetUserAgent(\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36\");\n```\n\n### DataDome\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#datadome)\u003c/sup\u003e\n\nUse this method to solve DataDome captcha.\n\n\u003e [!IMPORTANT]\n\u003e To solve the DataDome captcha, you must use a proxy. It is recommended to use [residential proxies].\n\n```csharp\nDataDome dataDome = new DataDome();\ndataDome.SetCapthaUrl(\"https://geo.captcha-delivery.com/captcha/?initialCid=AHrlqAAA...P~XFrBVptk\u0026t=fe\u0026referer=https%3A%2F%2Fhexample.com\u0026s=45239\u0026e=c538be..c510a00ea\");\ndataDome.SetPageUrl(\"https://example.com/\");\ndataDome.SetProxy(\"http\", \"username:password@1.2.3.4:5678\");\ndataDome.SetUserAgent(\"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Mobile Safari/537.3\");\n```\n\n### atbCAPTCHA\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#atb-captcha)\u003c/sup\u003e\n\nUse this method to solve atbCAPTCHA. Returns a token to bypass the captcha.\n\n```csharp\nAtbCAPTCHA atbCAPTCHA = new AtbCAPTCHA();\natbCAPTCHA.SetAppId(\"af23e041b22d000a11e22a230fa8991c\");\natbCAPTCHA.SetApiServer(\"https://cap.aisecurius.com\");\natbCAPTCHA.SetPageUrl(\"https://www.example.com/\");\n```\n\n### Tencent\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#tencent)\u003c/sup\u003e\n\nUse this method to solve Tencent captcha. Returns a token to bypass the captcha.\n\n```csharp\nTencent tencent = new Tencent();\ntencent.SetAppId(\"190014885\");\ntencent.SetPageUrl(\"https://www.example.com/\");\n```\n\n\n## Other methods\n\n### send / getResult\nThese methods can be used for manual captcha submission and answer polling.\n\n```csharp\nstring captchaId = await solver.Send(captcha);\n\nTask.sleep(20 * 1000);\n\nstring code = await solver.GetResult(captchaId);\n```\n### balance\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#additional-methods)\u003c/sup\u003e\n\nUse this method to get your account's balance\n\n```csharp\ndouble balance = await solver.Balance();\n```\n### report\n\n\u003csup\u003e[API method description.](https://2captcha.com/2captcha-api#complain)\u003c/sup\u003e\n\nUse this method to report good or bad captcha answer.\n\n```csharp\nawait solver.Report(captcha.Id, true); // captcha solved correctly\nawait solver.Report(captcha.Id, false); // captcha solved incorrectly\n```\n## Proxies\n\nYou can pass your proxy as an additional argument for methods: recaptcha, funcaptcha, geetest, geetest v4, keycaptcha, capy puzzle, lemin, cloudflare turnstile, amazon waf, friendly captcha, mtcaptcha, cutcaptcha, cybersiara, datadome, atbcaptcha, tencent and etc. The proxy will be forwarded to the API to solve the captcha.\n\nWe have our own proxies that we can offer you. [Buy residential proxies] for avoid restrictions and blocks. [Quick start].\n\n```csharp\ncaptcha.SetProxy(\"HTTPS\", \"login:password@IP_address:PORT\");\n```\n\n\n## Error handling\nIf case of an error captcha solver throws an exception. It's important to properly handle these cases. We recommend to use `try catch` to handle exceptions.\nThe list of all errors can be found in the  [API documentation](https://2captcha.com/2captcha-api#list-of-inphp-errors).\n\n```csharp\ntry\n{\n    await solver.Solve(captcha);\n}\ncatch (ValidationException e)\n{\n    // invalid parameters passed\n}\ncatch (NetworkException e)\n{\n    // network error occurred\n}\ncatch (ApiException e)\n{\n    // api respond with error\n}\ncatch (TimeoutException e)\n{\n    // captcha is not solved so far\n}\n```\n\n## Get in touch\n\n\u003ca href=\"mailto:support@2captcha.com\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/539df209-7c85-4fa5-84b4-fc22ab93fac7\" width=\"80\" height=\"30\" alt=\"Send email to support\"\u003e\u003c/a\u003e\n\u003ca href=\"https://2captcha.com/support/tickets/new\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/be044db5-2e67-46c6-8c81-04b78bd99650\" width=\"81\" height=\"30\" alt=\"Create ticket\"\u003e\u003c/a\u003e\n\n## Join the team 👪\n\nThere are many ways to contribute, of which development is only one! Find your next job. Open positions: AI experts, scrapers, developers, technical support, and much more! 😍\n\n\u003ca href=\"mailto:job@2captcha.com\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/36d23ef5-7866-4841-8e17-261cc8a4e033\" width=\"80\" height=\"30\" alt=\"Send email to support\"\u003e\u003c/a\u003e\n\n# License\n\nThe code in this repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.\n\n### Graphics and Trademarks\n\nThe graphics and trademarks included in this repository are not covered by the MIT License. Please contact \u003ca href=\"mailto:support@2captcha.com\"\u003esupport\u003c/a\u003e for permissions regarding the use of these materials.\n\n\n\u003c!-- Shared links --\u003e\n[nuget]: https://www.nuget.org/packages/2captcha-csharp/\n[2Captcha]: https://2captcha.com/\n[2captcha software catalog]: https://2captcha.com/software\n[Pingback settings]: https://2captcha.com/setting/pingback\n[Post options]: https://2captcha.com/2captcha-api#normal_post\n[list of supported languages]: https://2captcha.com/2captcha-api#language\n[Examples directory]: /TwoCaptcha.Examples\n[residential proxies]: https://2captcha.com/proxy/residential-proxies\n[Buy residential proxies]: https://2captcha.com/proxy/residential-proxies\n[Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2captcha%2F2captcha-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2captcha%2F2captcha-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2captcha%2F2captcha-csharp/lists"}