Skip to content

NetEase Yidun

IllustrationNetEase Yidun: drag the slider until the piece fills the gap in the picture. The task returns solution.token.

Summary

PropertyValue
v1 typeyidun beta
createTask namesYidunTask
Proxyoptional (Proxies)
Deadline120 seconds (starting value). A task not solved by then fails with timeout and is not charged.

Parameters

The params object of POST /v1/tasks. Unknown fields are rejected with 422 invalid_params.

FieldTypeDescription
website_url
required
string

Full URL of the page that shows the captcha (http or https).

format: uri · pattern: ^[Hh][Tt][Tt][Pp][Ss]?:// · min length 8 · max length 4,096
website_key
required
string

The Yidun captchaId.

min length 1 · max length 512
get_lib
optional
string

Full URL of the Yidun script the page loads. Recommended for the enterprise version.

format: uri · pattern: ^[Hh][Tt][Tt][Pp][Ss]?:// · min length 8 · max length 4,096
api_server_subdomain
optional
string

Yidun API server, if not c.dun.163.com (enterprise version).

format: hostname · min length 1 · max length 253
challenge
optional
string

Enterprise version: the challenge of the current captcha.

min length 1 · max length 1,024
hcg
optional
string

Enterprise version: the hcg hash.

min length 1 · max length 1,024
hct
optional
integer

Enterprise version: the hct timestamp.

≥ 0
user_agent
optional
string

Browser User-Agent.

min length 1 · max length 1,024
proxy
optional
object

Proxy the solver must use. login and password are used in memory only and are never stored or logged.

proxy.type
required
enumone of "http", "https", "socks4", "socks5"
proxy.host
required
string

IP address or host name. Private and loopback addresses are rejected.

min length 1 · max length 253
proxy.port
required
integer≥ 1 · ≤ 65535
proxy.login
optional
stringmax length 256
proxy.password
optional
stringmax length 256

Solution

The solution object of a solved task.

FieldTypeDescription
token
required
string

Token to submit to the target site. Single use.

min length 1

Example: native API (v1)

Runs as is with a test key (nop_test_…) in the sandbox; use a live key for real tasks.

POST /v1/tasks
{
"type": "yidun",
"params": {
"website_url": "https://example.com/login",
"website_key": "6cw0f0485d5d46auacf9b735d20218a5",
"get_lib": "https://cstaticdun.126.net/load.min.js",
"api_server_subdomain": "c.dun.example.com",
"challenge": "a0b1",
"hcg": "9f8e",
"hct": 1761048664,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36"
}
}
Terminal window
export NOPTCHA_KEY=nop_test_... # your test or live key
# waits up to 60 s; 200 = finished (solved or failed), 202 = still processing
IDEMPOTENCY_KEY=$(uuidgen) # one key per task you want; a retry of the same request reuses it
curl -s -X POST "https://api.noptcha.com/v1/tasks" \
-H "Authorization: Bearer $NOPTCHA_KEY" \
-H 'Prefer: wait=60' \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H 'Content-Type: application/json' \
-d @- <<EOF
{
"type": "yidun",
"params": {
"website_url": "https://example.com/login",
"website_key": "6cw0f0485d5d46auacf9b735d20218a5",
"get_lib": "https://cstaticdun.126.net/load.min.js",
"api_server_subdomain": "c.dun.example.com",
"challenge": "a0b1",
"hcg": "9f8e",
"hct": 1761048664,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36"
}
}
EOF
# on 202: long-poll with the "id" from the response
TASK_ID=...
curl -s "https://api.noptcha.com/v1/tasks/$TASK_ID?wait=60" \
-H "Authorization: Bearer $NOPTCHA_KEY"

In the sandbox the task is solved at once and solution is:

{
"token": "NOPTCHA_TEST_TOKEN_7259140378796032"
}

createTask API

NameProxy
YidunTaskoptional

Task fields (in task, next to type) and the v1 parameter each one becomes:

createTask fieldv1 parameter
challengechallenge
hcghcg
hcthct
userAgentuser_agent
websiteKeywebsite_key
websiteURLwebsite_url
yidunApiServerSubdomainapi_server_subdomain
yidunGetLibget_lib
proxyType, proxyAddress, proxyPort, proxyLogin, proxyPasswordproxy (Proxies)

Solution fields in getTaskResult:

createTask fieldv1 solution field
tokentoken

Example: createTask API

POST /createTask
{
"clientKey": "nop_test_…",
"task": {
"type": "YidunTask",
"websiteURL": "https://example.com/login",
"websiteKey": "6cw0f0485d5d46auacf9b735d20218a5",
"yidunGetLib": "https://cstaticdun.126.net/load.min.js",
"yidunApiServerSubdomain": "c.dun.example.com",
"challenge": "a0b1",
"hcg": "9f8e",
"hct": 1761048664,
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36"
}
}
Terminal window
export NOPTCHA_KEY=nop_test_... # your test or live key
# 1. create the task
curl -s -X POST "https://api.noptcha.com/createTask" \
-H 'Content-Type: application/json' \
-d @- <<EOF
{
"clientKey": "$NOPTCHA_KEY",
"task": {
"type": "YidunTask",
"websiteURL": "https://example.com/login",
"websiteKey": "6cw0f0485d5d46auacf9b735d20218a5",
"yidunGetLib": "https://cstaticdun.126.net/load.min.js",
"yidunApiServerSubdomain": "c.dun.example.com",
"challenge": "a0b1",
"hcg": "9f8e",
"hct": 1761048664,
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36"
}
}
EOF
# 2. poll with the taskId from step 1 every few seconds until "status" is "ready"
TASK_ID=...
curl -s -X POST "https://api.noptcha.com/getTaskResult" \
-H 'Content-Type: application/json' \
-d @- <<EOF
{
"clientKey": "$NOPTCHA_KEY",
"taskId": $TASK_ID
}
EOF

In the sandbox getTaskResult returns "status": "ready" and solution:

{
"token": "NOPTCHA_TEST_TOKEN_7259140378796032"
}