FunCaptcha Token Solving
Solve FunCaptcha token challenges programmatically. Token-based FunCaptcha returns a verification token that can be submitted with your form, bypassing the visual challenge entirely.
FunCaptcha Token solving generates a valid response token without requiring interactive challenges. This is useful for automating form submissions that require FunCaptcha (Arkose Labs) verification.
Captcha Type
Use the following captcha type identifier in your API requests:
"type": "FUNCAPTCHA_TOKEN"
Request Format
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
auth.token |
string | required | Your API key |
captcha.type |
string | required | Must be "FUNCAPTCHA_TOKEN" |
captcha.metadata.siteUrl |
string | required | The URL where the FunCaptcha appears |
captcha.metadata.siteKey |
string | required | FunCaptcha public key (websitePublicKey) |
captcha.metadata.subdomain |
string | optional | Custom subdomain for captcha widget (if required by the website) |
captcha.payload.data |
string | optional | Additional data parameter (blob value as stringified JSON) |
captcha.payload.userAgent |
string | optional | Browser user agent string (recommended) |
captcha.payload.proxy |
object | optional | Proxy configuration object |
captcha.payload.proxy.protocol |
string | required* | Proxy protocol: "http", "https", "socks4", "socks5" |
captcha.payload.proxy.host |
string | required* | Proxy IP address |
captcha.payload.proxy.port |
number | required* | Proxy port number |
captcha.payload.proxy.username |
string | optional | Proxy authentication username |
captcha.payload.proxy.password |
string | optional | Proxy authentication password |
* Required only if proxy object is provided
Example Request
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: 'FUNCAPTCHA_TOKEN',
metadata: {
siteUrl: 'https://example.com/login',
siteKey: '472fc7af-86a4-4382-9a49-ca9090474471',
subdomain: 'custom-subdomain' // Optional
},
payload: {
data: '{"blob": "flaR60YY3tnRXv6w.l32U2KgdgEUCbyoSPI4jOxU..."}', // Optional
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
proxy: {
protocol: 'http',
host: '1.2.3.4',
port: 8080,
username: 'proxyuser',
password: 'proxypass'
}
}
}
})
});
const data = await response.json();
console.log('Task ID:', data.task.id);
Response Format
Create Task Response (Processing)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha is being processed",
"task": {
"id": "MyDisctSolver_abc123def456",
"status": "processing"
}
}
Fetch Result Response (Processing)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha is being processed",
"task": {
"id": "MyDisctSolver_abc123def456",
"status": "processing"
}
}
Fetch Result Response (Completed)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha solved successfully",
"task": {
"id": "MyDisctSolver_abc123def456",
"status": "completed",
"result": {
"token": "70817af9cab3c7087.9405483605|r=eu-west-1|meta=3|meta_width=558...",
"timestamp": "2025-11-24T18:51:02.789Z"
}
}
}
token- The FunCaptcha response token to submit with your formtimestamp- When the captcha was solved
The token field contains the FunCaptcha response token. This token should be submitted
in your form or API request where FunCaptcha verification is required.
Implementation Guide
Step 1: Extract FunCaptcha Public Key
First, find the FunCaptcha public key from the page:
// Method 1: From data-pkey attribute
function getFunCaptchaPublicKey() {
const funcaptchaElement = document.querySelector('[data-pkey]');
if (funcaptchaElement) {
return funcaptchaElement.getAttribute('data-pkey');
}
const iframe = document.querySelector('iframe[src*="funcaptcha.com"]');
if (iframe) {
const src = iframe.src;
const match = src.match(/public_key=([^&]+)/);
return match ? match[1] : null;
}
const scripts = document.querySelectorAll('script');
for (const script of scripts) {
const match = script.textContent.match(/public_key['"s:]+([a-f0-9-]+)/i);
if (match) {
return match[1];
}
}
return null;
}
const publicKey = getFunCaptchaPublicKey();
console.log('Public Key:', publicKey);
Step 2: Solve FunCaptcha Token
async function solveFunCaptchaToken(siteUrl, siteKey) {
const createResponse = 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: 'FUNCAPTCHA_TOKEN',
metadata: { siteUrl, siteKey },
payload: {
userAgent: navigator.userAgent
}
}
})
});
const createData = await createResponse.json();
if (!createData.success) {
throw new Error(createData.error.message);
}
const taskId = createData.task.id;
while (true) {
await new Promise(resolve => setTimeout(resolve, 5000)); // Wait 5 seconds
const resultResponse = await fetch('https://solver-api.mydisct.com/fetchResult', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({ taskId })
});
const resultData = await resultResponse.json();
if (resultData.task.status === 'completed') {
return resultData.task.result.token;
} else if (resultData.task.status === 'failed') {
throw new Error('Token solving failed');
}
}
}
const token = await solveFunCaptchaToken(
'https://example.com/login',
'472fc7af-86a4-4382-9a49-ca9090474471'
);
console.log('FunCaptcha Token:', token);
Step 3: Submit Token
// Method 1: Set verification token value
async function submitWithFunCaptchaToken(token) {
const verificationField = document.querySelector('input[name="verification-token"]');
if (verificationField) {
verificationField.value = token;
}
if (window.myFunCaptchaCallback) {
window.myFunCaptchaCallback(token);
}
document.querySelector('form').submit();
}
async function submitViaAPI(token) {
const response = await fetch('https://example.com/api/verify', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
username: 'myusername',
password: 'mypassword',
'fc-token': token
})
});
return await response.json();
}
const token = await solveFunCaptchaToken(siteUrl, siteKey);
await submitWithFunCaptchaToken(token);
Python Example
import requests
import time
def solve_funcaptcha_token(site_url, site_key, api_key):
"""
Solve FunCaptcha token challenge
Args:
site_url: URL where captcha appears
site_key: FunCaptcha public key
api_key: Your MyDisct Solver API key
Returns:
FunCaptcha response token
"""
# Step 1: Create task
create_response = requests.post(
'https://solver-api.mydisct.com/createTask',
headers={
'Content-Type': 'application/json',
'apikey': api_key
},
json={
'auth': {'token': api_key},
'context': {'source': 'api', 'version': '1.0.0'},
'captcha': {
'type': 'FUNCAPTCHA_TOKEN',
'metadata': {
'siteUrl': site_url,
'siteKey': site_key
},
'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) # Wait 5 seconds
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']['token']
elif result_data['task']['status'] == 'failed':
raise Exception('Token solving failed')
print('Waiting for solution...')
# Example usage
token = solve_funcaptcha_token(
site_url='https://example.com/login',
site_key='472fc7af-86a4-4382-9a49-ca9090474471',
api_key='YOUR_API_KEY'
)
print(f'FunCaptcha Token: {token}')
# Submit with form
response = requests.post(
'https://example.com/login',
data={
'username': 'myusername',
'password': 'mypassword',
'fc-token': token
}
)
print(f'Login response: {response.status_code}')
Best Practices
- Always use the exact site URL where the FunCaptcha appears
- Include user agent for better success rates
- Poll every 5 seconds for token-based captchas (they take 10-30 seconds)
- Handle token expiration (FunCaptcha tokens typically expire after 2-5 minutes)
- If blob/data parameter is required, extract it from the FunCaptcha initialization
- Use proxy if the target website requires region-specific solving
Common Issues
Solution: Ensure you're using the correct public key and site URL. The URL must match exactly where the FunCaptcha is displayed. Some sites also require the blob/data parameter to be included.
Solution: FunCaptcha tokens expire after a few minutes. Request a new token if submission takes too long.
Solution: Some FunCaptcha implementations require a blob/data parameter.
Extract this from the FunCaptcha initialization script on the page and include it in the
captcha.payload.data field.