NeuroCaptcha

2Captcha compatibility

in.php and res.php for 2Captcha and RuCaptcha clients: parameters, answers, task type mapping and error codes.

ส่วนนี้แสดงเป็นภาษาอังกฤษ

ในหน้านี้

in.php and res.php take the same keys and create the same tasks as the JSON API. Use GET or POST (query string or form fields). The answer is plain text, or JSON with json=1; the HTTP status is always 200.

in.php — create a task#

key
stringจำเป็น
Your API key.
method
stringจำเป็น
userrecaptcha.
googlekey
stringจำเป็น
Site key (websiteKey).
pageurl
stringจำเป็น
Page address (websiteURL).
version
string
v3 for reCAPTCHA v3.
enterprise
string
1 for reCAPTCHA Enterprise.
invisible
string
1 for invisible reCAPTCHA v2.
action
string
v3 action (pageAction).
min_score
number
Minimum v3 score (minScore).
data-s
string
recaptchaDataSValue.
userAgent
string
User-Agent of your browser.
cookies
string
KEY:Value;KEY2:Value2 (converted to KEY=Value; KEY2=Value2).
domain
string
google.com or recaptcha.net.
proxy
string
login:password@host:port or host:port.
proxytype
string
HTTP, HTTPS, SOCKS4 or SOCKS5.
soft_id
integer
Developer program id (softId).
pingback
string
Webhook URL (callbackUrl), see Webhooks.
json
string
1 — answer in JSON.
header_acao
string
1 — add Access-Control-Allow-Origin: * to the answer.
in.php
curl -s "https://neurocaptcha.com/in.php?key=YOUR_API_KEY&method=userrecaptcha&googlekey=6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-&pageurl=https://www.google.com/recaptcha/api2/demo"
# → OK|7781

curl -s "https://neurocaptcha.com/in.php?key=YOUR_API_KEY&method=userrecaptcha&googlekey=6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-&pageurl=https://www.google.com/recaptcha/api2/demo&json=1"
# → {"request":"7781","status":1}

Which task type is created#

versionenterpriseproxyTask type
———RecaptchaV2TaskProxyless
——yesRecaptchaV2Task
—1—RecaptchaV2EnterpriseTaskProxyless
—1yesRecaptchaV2EnterpriseTask
v3—anyRecaptchaV3TaskProxyless (proxy ignored)
v31—RecaptchaV3EnterpriseTaskProxyless
v31yesRecaptchaV3EnterpriseTask

res.php — results, balance, reports#

actionParametersAnswer
getidOK|<token> or CAPCHA_NOT_READY; with json=1: {"request":"<token>","status":1,"useragent":"…"}
getids=1,2,3 (up to 100)answers in the same order, joined by |: <token>|CAPCHA_NOT_READY|ERROR_…
get2idOK|<token>|<cost>; with json=1 the cost is in price
getbalance—balance in USD, e.g. 12.3456
reportbad, reportgoodidOK_REPORT_RECORDED — same rules as reports
res.php
curl -s "https://neurocaptcha.com/res.php?key=YOUR_API_KEY&action=get&id=7781"
# → CAPCHA_NOT_READY, then OK|03AFcWeA6Z3vq0VhGm1oS8r0bAxKk4…

curl -s "https://neurocaptcha.com/res.php?key=YOUR_API_KEY&action=getbalance&json=1"
# → {"request":"12.3456","status":1}

Poll res.php every 2–3 seconds; the token is kept for the same time as in the JSON API.

Error codes#

Errors come as text (ERROR_…) or as {"request":"ERROR_…","status":0} with json=1. Some JSON-API codes get their 2Captcha names:

JSON APIin.php / res.php
ERROR_NO_SUCH_CAPCHA_IDERROR_WRONG_CAPTCHA_ID
ERROR_TASK_ABSENT, ERROR_TASK_NOT_SUPPORTED, ERROR_NO_SUCH_METHODERROR_BAD_PARAMETERS
ERROR_RECAPTCHA_TIMEOUTERROR_CAPTCHA_UNSOLVABLE
ERROR_PROXY_CONNECT_REFUSED, ERROR_PROXY_CONNECT_TIMEOUT, ERROR_PROXY_READ_TIMEOUT, ERROR_PROXY_BANNED, ERROR_PROXY_NOT_AUTHORISEDERROR_PROXY_CONNECTION_FAILED
ERROR_INTERNALERROR_INTERNAL_SERVER_ERROR
CodeWhen
ERROR_WRONG_USER_KEYkey is empty
ERROR_BAD_PARAMETERSmethod is not userrecaptcha, unknown action, more than 100 ids
ERROR_GOOGLEKEYgooglekey is missing
ERROR_PAGEURLpageurl is missing
ERROR_BAD_PROXYproxy or proxytype cannot be parsed
ERROR_WRONG_CAPTCHA_IDid is not a positive number, or there is no such task

Other codes (ERROR_KEY_DOES_NOT_EXIST, ERROR_ZERO_BALANCE, ERROR_NO_SLOT_AVAILABLE, ERROR_TOO_MUCH_REQUESTS, ERROR_CAPTCHA_UNSOLVABLE…) are passed as they are — see Errors.