Looking for an overview? See the Kasada product page
Resolving Kasada 429/403 Errors
Kasada protects websites using JavaScript challenges and computational proof-of-work. When requests lack valid x-kpsdk-ct tokens or fail PoW verification, servers return 429 or 403 errors. MeshPrivacy solves Kasada challenges by executing the proof-of-work computation server-side.
Error Codes
| Code | Meaning | Resolution |
|---|---|---|
| 429 | Proof-of-work challenge required | Generate ct/cd tokens via API |
| 403 | Challenge validation failed or blocked | Request new tokens with fresh session |
| 406 | Challenge response invalid format | Verify token format and submission |
| 400 | Malformed challenge request | Check request structure |
Real-time API status: trust.meshprivacy.com
Headers & Tokens
Required Headers
x-kpsdk-ct - Challenge tokenx-kpsdk-cd - Proof-of-work resultx-kpsdk-v - Kasada versionx-kpsdk-r - Request identifierSuccess Indicators
Valid
ct token in responseProper
cd proof-of-work solutionJavaScript executed without errors
Headers match expected format
Service Variants
Kasada exposes two distinct service IDs in MeshPrivacy. Pick the one matching the challenge type returned by the target.
kasadaPrimary
Primary Kasada challenge token. Handles JavaScript challenge execution and returns a valid x-kpsdk-ct header.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Target URL protected by Kasada |
api_domain | string | No | Protected API domain (e.g. api.example.com) |
script_domain | string | No | Kasada script domain hosting ips.js/fp.js |
proxy_config | string | No | |
user_agent | string | No |
kasada.js
// Submit Kasada (ct) task
const response = await fetch('https://api.meshprivacy.com/v1/tasks/submit', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-API-Key': API_KEY },
body: JSON.stringify({
service: 'kasada',
url: 'https://target-site.com/', // required
api_domain: 'api.target-site.com', // optional - protected API domain
script_domain: 'target-site.com', // optional - script-host domain
proxy_config: 'http://user:pass@ip:port', // optional
user_agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)...'// optional
})
});
const { task_id } = await response.json();
const result = await fetch(`https://api.meshprivacy.com/v1/tasks/result/${task_id}`, {
headers: { 'X-API-Key': API_KEY }
});
const { headers } = await result.json();
// Use headers['x-kpsdk-ct'] in your requestskasada_cd
Computational proof-of-work variant. Returns a valid x-kpsdk-cd header for sites where the standard kasada flow does not apply (typically domain-only, no full URL).
| Field | Type | Required | Description |
|---|---|---|---|
site | string | Yes | Target site domain without protocol (e.g. nike) |
client_token | string | No | x-kpsdk-ct cookie value from initial page load |
session_token | string | No | x-kpsdk-st cookie/header value |
feature_config | string | No | Site-specific config from Kasada response |
proxy_config | string | No | |
user_agent | string | No |
kasada-cd.js
// Submit Kasada CD (proof-of-work) task
const response = await fetch('https://api.meshprivacy.com/v1/tasks/submit', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-API-Key': API_KEY },
body: JSON.stringify({
service: 'kasada_cd',
site: 'nike', // required - domain w/o protocol
client_token: '<x-kpsdk-ct value>', // optional - from initial page load
session_token: '<x-kpsdk-st value>', // optional
feature_config: '<site-specific config>', // optional - from Kasada response
proxy_config: 'http://user:pass@ip:port', // optional
user_agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)...'// optional
})
});FAQ
Kasada tokens have dynamic TTLs that vary by site configuration. Generally, tokens remain valid for the current session but may require refresh after several minutes of inactivity.
