NetEase Captcha Token Solving
Solve NetEase (Yidun) captcha challenges programmatically. NetEase Captcha is a popular captcha system developed by NetEase, widely used on Chinese websites and applications.
NetEase Captcha (易盾) is a captcha protection system developed by NetEase. It's commonly used on Chinese websites and applications for bot protection. There's also an Enterprise version with additional parameters. The solution returns a token for form submission.
Captcha Type
Use the following captcha type identifier in your API requests:
"type": "NETEASE_CAPTCHA_TOKEN"
Finding Captcha Parameters
To solve NetEase Captcha, you need to find the parameters from network requests:
// Open Developer Tools, activate the captcha, go to Network tab
If you find captchaId, captchaHash, and captchaTimestamp parameters in network
requests, this indicates the Enterprise version. You should also provide jsLibUrl (JS file path) and
apiServerSubdomain for Enterprise captchas.
Request Format
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
auth.token |
string | required | Your API key |
captcha.type |
string | required | Must be "NETEASE_CAPTCHA_TOKEN" |
captcha.metadata.siteUrl |
string | required | The URL where the captcha appears (referer parameter) |
captcha.metadata.siteKey |
string | required | NetEase captcha ID (id parameter from network request) |
captcha.metadata.jsLibUrl |
string | optional | Full URL to the JS file (e.g., load.min.js) - for Enterprise version |
captcha.metadata.apiServerSubdomain |
string | optional | Custom API server subdomain - for Enterprise version |
captcha.payload.captchaId |
string | optional | Unique captcha identifier - for Enterprise version |
captcha.payload.captchaHash |
string | optional | Captcha hash value - for Enterprise version |
captcha.payload.captchaTimestamp |
integer | optional | Numeric timestamp - for Enterprise version |
captcha.payload.proxy |
object | optional | Proxy configuration (optional) |
Proxy Object Structure (Optional)
| Parameter | Type | Required | Description |
|---|---|---|---|
protocol |
string | required | Proxy protocol: "http", "https", "socks4", or "socks5" |
host |
string | required | Proxy IP address or hostname |
port |
number | required | Proxy port number |
username |
string | optional | Proxy authentication username |
password |
string | optional | Proxy authentication password |
Example Request (Standard)
const response = await fetch('https://solver-api.mydisct.com/createTask', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({
auth: {
token: 'YOUR_API_KEY'
},
context: {
source: 'api',
version: '1.0.0'
},
captcha: {
type: 'NETEASE_CAPTCHA_TOKEN',
metadata: {
siteUrl: 'https://www.example.com',
siteKey: '6cw0f0485d5d46auacf9b735d20218a5'
},
payload: {}
}
})
});
const data = await response.json();
console.log('Task ID:', data.task.id);
Example Request (Enterprise)
const response = await fetch('https://solver-api.mydisct.com/createTask', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({
auth: {
token: 'YOUR_API_KEY'
},
context: {
source: 'api',
version: '1.0.0'
},
captcha: {
type: 'NETEASE_CAPTCHA_TOKEN',
metadata: {
siteUrl: 'https://www.example.com',
siteKey: '6cw0f0485d5d46auacf9b735d20218a5',
jsLibUrl: 'https://cstaticdun.126.net/load.min.js',
apiServerSubdomain: 'custom-api.dun.163.com'
},
payload: {
captchaId: 'unique_captcha_identifier',
captchaHash: 'hash_value_from_page',
captchaTimestamp: 1701432000
}
}
})
});
const data = await response.json();
console.log('Task ID:', data.task.id);
Response Format
Create Task Response (Processing)
{
"success": true,
"service": "MyDisct Solver",
"message": "Task created successfully",
"task": {
"id": "MyDisctSolver_abc123",
"status": "processing"
}
}
Fetch Result Response (Completed)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha solved successfully",
"task": {
"id": "MyDisctSolver_abc123",
"status": "completed",
"result": {
"token": "CN31_9AwsPmaYcJameP_09rA0vkVMQsPij...RXTlFJFc3",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
"timestamp": "2025-12-01T12:00:15.000Z"
}
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
result.token |
string | The NetEase captcha validation token for form submission. |
result.user_agent |
string | The exact user agent used during solving. Must be forwarded in all subsequent requests that use the generated token. |
The token field contains the NetEase captcha validation token. Submit this token
in the appropriate form field or include it in your API request to the target website.
Python Example
import requests
import time
def solve_netease_captcha(site_url, site_key, api_key):
# Step 1: Create task
payload = {
'auth': {'token': api_key},
'context': {'source': 'api', 'version': '1.0.0'},
'captcha': {
'type': 'NETEASE_CAPTCHA_TOKEN',
'metadata': {
'siteUrl': site_url,
'siteKey': site_key
},
'payload': {}
}
}
create_response = requests.post(
'https://solver-api.mydisct.com/createTask',
headers={
'Content-Type': 'application/json',
'apikey': api_key
},
json=payload
)
create_data = create_response.json()
if not create_data['success']:
raise Exception(create_data['error']['message'])
task_id = create_data['task']['id']
print(f'Task created: {task_id}')
# Step 2: Poll for result
while True:
time.sleep(5)
result_response = requests.post(
'https://solver-api.mydisct.com/fetchResult',
headers={'Content-Type': 'application/json', 'apikey': api_key},
json={'taskId': task_id}
)
result_data = result_response.json()
if result_data['task']['status'] == 'completed':
return result_data['task']['result'] # Contains token and user_agent
elif result_data['task']['status'] == 'failed':
raise Exception('Solving failed')
print('Still processing...')
# Usage
result = solve_netease_captcha(
site_url='https://www.example.com',
site_key='6cw0f0485d5d46auacf9b735d20218a5',
api_key='YOUR_API_KEY'
)
print(f'NetEase token: {result["token"]}')
print(f'User Agent: {result["user_agent"]}')
cURL Example
# Create task
curl -X POST https://solver-api.mydisct.com/createTask \
-H "Content-Type: application/json" \
-H "apikey: YOUR_API_KEY" \
-d '{
"auth": {"token": "YOUR_API_KEY"},
"context": {"source": "api", "version": "1.0.0"},
"captcha": {
"type": "NETEASE_CAPTCHA_TOKEN",
"metadata": {
"siteUrl": "https://www.example.com",
"siteKey": "6cw0f0485d5d46auacf9b735d20218a5"
},
"payload": {}
}
}
}'
# Fetch result (replace TASK_ID with actual task ID)
curl -X POST https://solver-api.mydisct.com/fetchResult \
-H "Content-Type: application/json" \
-H "apikey: YOUR_API_KEY" \
-d '{"taskId": "TASK_ID"}'
Best Practices
- Use a valid Windows User-Agent string for better success rates
- Forward the
user_agentfrom the response in all subsequent requests that use the token - For Enterprise version, always provide jsLibUrl and apiServerSubdomain
- Enterprise parameters (captchaId, captchaHash, captchaTimestamp) are short-lived, extract and use them immediately
- The siteKey (id parameter) is typically a 32-character alphanumeric string
- Check network requests starting with "get?referer=" or "check?referer=" to find parameters
- Using a proxy is optional but may be required for some websites