CAPTCHAFORUM
Administrator
Our API is based on HTTP requests and supports both HTTP and HTTPS protocols.
API endpoints:
- http://2captcha.com/in.php is used to submit a captcha
- http://2captcha.com/res.php is used to get the captcha solution
The process of solving captchas with 2captcha is really easy and it's mostly the same for all types of captchas:
- Get your API key from your account settings page. Each user is given a unique authentication token, we call it API key. It's a 32-characters string that looks like:
1abc234de56fab7c89012d34e56fa7b8
This key will be used for all your requests to our server. - Submit a HTTP POST request to our API URL: http://2captcha.com/in.php with parameters corresponding to the type of your captcha.
Server will return captcha ID or an error code if something went wrong. - Make a timeout: 20 seconds for ReCaptcha, 5 seconds for other types of captchas.
- Submit a HTTP GET request to our API URL: http://2captcha.com/res.php to get the result.
If captcha is already solved server will return the answer in format corresponding to the type of your captcha.
By default answers are returned as plain text like: OK|Your answer. But answer can also be returned as JSON {"status":1,"request":"TEXT"} if json parameter is used.
If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
If something went wrong server will return an error code.