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

CodeMeaningResolution
429Proof-of-work challenge requiredGenerate ct/cd tokens via API
403Challenge validation failed or blockedRequest new tokens with fresh session
406Challenge response invalid formatVerify token format and submission
400Malformed challenge requestCheck request structure

Real-time API status: trust.meshprivacy.com

Headers & Tokens

Required Headers
x-kpsdk-ct - Challenge token
x-kpsdk-cd - Proof-of-work result
x-kpsdk-v - Kasada version
x-kpsdk-r - Request identifier
Success Indicators
Valid ct token in response
Proper cd proof-of-work solution
JavaScript 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.

FieldTypeRequiredDescription
urlstringYesTarget URL protected by Kasada
api_domainstringNoProtected API domain (e.g. api.example.com)
script_domainstringNoKasada script domain hosting ips.js/fp.js
proxy_configstringNo
user_agentstringNo
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 requests

kasada_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).

FieldTypeRequiredDescription
sitestringYesTarget site domain without protocol (e.g. nike)
client_tokenstringNox-kpsdk-ct cookie value from initial page load
session_tokenstringNox-kpsdk-st cookie/header value
feature_configstringNoSite-specific config from Kasada response
proxy_configstringNo
user_agentstringNo
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.

Related Services