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.payload.funcaptchaSubdomain |
string | optional | Custom Arkose Labs subdomain for the enforcement API (e.g. "custom-api.arkoselabs.com") |
captcha.payload.funcaptchaData |
string | optional | Blob data parameter as stringified JSON: '{"blob": "..."}' |
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'
},
payload: {
funcaptchaData: '{"blob": "flaR60YY3tnRXv6w.l32U2KgdgEUCbyoSPI4jOxU..."}',
funcaptchaSubdomain: 'custom-api.arkoselabs.com',
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...",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"cookies": {
"_gh_sess": "BAh7CUkiD3Nlc3Npb25faWQGOgZFRiIlZTI1N...",
"logged_in": "yes",
"_octo": "GH1.1.1234567890.1700000000",
"_device_id": "abcdef1234567890",
"_raw_cookie_string": "_gh_sess=BAh7CUk...; logged_in=yes; _octo=GH1.1.1234...; _device_id=abcdef1234..."
}
}
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
result.token |
string | The FunCaptcha response token to submit with your form or API request |
result.user_agent |
string | Browser user agent used during solving. Use this exact value in your subsequent requests for consistency |
result.cookies |
object |
Collected cookies from the solving browser session, normalized as a flat key-value map. Useful when the target website also validates session/WAF cookies together with the FunCaptcha token. |
The token field contains the FunCaptcha response token. Submit this token in your form or API request where FunCaptcha verification is required. The user_agent field contains the browser user agent used during solving and should be included in your requests to avoid detection.
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, options = {}) {
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,
...(options.funcaptchaData && { funcaptchaData: options.funcaptchaData }),
...(options.funcaptchaSubdomain && { funcaptchaSubdomain: options.funcaptchaSubdomain })
}
}
})
});
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.