ALTCHA
ALTCHA: parameters, request, response and the 2Captcha method of AltchaTaskProxyless and AltchaTask.
On this page
ALTCHA: the proof-of-work widget that asks the browser to compute a hash for a challenge. The answer is the token the widget puts into its form field.
| Status | coming soon |
| Type codes | AltchaTaskProxyless — without a proxy; AltchaTask — with your proxy |
| Proxy | optional: the second code takes your proxy |
| Also accepted as | AltchaTaskProxyLess |
| Price | set when the type is switched on — see pricing |
Rules#
- The proxy code solves through your proxy, so the answer is issued for your IP address. See Proxies.
Parameters#
Fields of the task object in createTask:
ParameterDescription
typestringrequired- Task type:
AltchaTaskProxyless,AltchaTask. websiteURLstringrequired- Full address of the page with the captcha: http(s), up to 2048 characters, a public site.
challengeURLstring- URL the widget fetches its challenge from; send this or
challengeJSON. Absolute http(s) URL of a public site, up to 2048 characters. challengeJSONJSON- The challenge that URL returns; send this or
challengeURL. JSON (an object, an array or a JSON-encoded string), up to 8 KB. userAgentstring- User-Agent of the browser that will use the answer, up to 512 characters.
proxyTypestringhttp(default),https,socks4orsocks5.proxyAddressstringfor proxy types- IP address or host name of the proxy. Private and local addresses are rejected.
proxyPortintegerfor proxy types- Proxy port, 1–65535.
proxyLoginstring- Proxy login, up to 256 characters. Stored encrypted.
proxyPasswordstring- Proxy password, up to 256 characters. Stored encrypted.
Request#
A AltchaTaskProxyless task:
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "AltchaTaskProxyless",
"websiteURL": "https://example.com/login"
}
}Response#
getTaskResult once the task is solved:
{
"errorId": 0,
"status": "ready",
"solution": {
"token": "TOKEN_eyJhbGciOiJIUzI1NiJ9…",
"userAgent": ""
},
"cost": "0.001000",
"ip": "198.51.100.7",
"createTime": 1793370000,
"endTime": 1793370012,
"solveCount": 1
}2Captcha in.php#
The same task through the 2Captcha API: method=altcha, parameters → task fields:
| in.php | task |
|---|---|
pageurl | websiteURL |
challenge_url | challengeURL |
challenge_json | challengeJSON |
res.php returns token of the solution as text (OK|…), or in request with json=1.