Kasada

Description

  • Parameter invocation is very complex

  • When you see x-kpsdk-ct or x-kpsdk-cd in request headers, it means kasada verification exists

  • For x-kpsdk-ct, keep user_agent consistent, result can be used multiple times

  • For x-kpsdk-cd, can only be used once

  • Supports pure calculation mode, for pure calculation please request ips_url API yourself, upload response content ips_script and response headers ips_headers, pure calculation mode does not require proxy

Request URL (POST):

Version
API URL

x-kpsdk-ct

https://wtf.red/api/kasada/ct

x-kpsdk-cd

https://wtf.red/api/kasada/cd

Request Headers:

Parameter Name
Description
Required

x-api-key

User secret, get from homepage

Yes

Content-Type

application/json

Yes

x-kpsdk-ct POST Data (JSON):

Parameter Name
Type
Description
Required

href

String

f12 search /149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/fp?x-kpsdk-v=j-1.1.0, if not found search /149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/ips.js?, fill in the url of the request containing this link in response html

Yes

fp_html

String

Response content of request ending with /fp?x-kpsdk-v=j-1.1.0

Yes

ips_url

String

Script address ending with ips.js

Yes

fp_host

String

Domain of request ending with /fp?x-kpsdk-v=j-1.1.0

No

ips_script

String

Response content of request ending with ips.js

No

ips_headers

String

Response headers of request ending with ips.js

No

submit

Boolean

Whether to submit tl request, directly return x-kpsdk-ct, default not submit, recommend not filling and use pure calculation mode

No

proxy

String

Keep proxy consistent, use overseas proxy, format: ip:port or usr:pwd@ip:port (contact admin if issues)

No

country

String

Country code of proxy used in business process, e.g. US (us), UK (uk), consult admin for details

No

ip

String

IP address of proxy used in business process (e.g. 56.214.78.94), consult admin for details

No

user_agent

String

Custom user_agent, keep consistent with subsequent verification request APIs

No

timeout

Integer

Verification timeout

No

x-kpsdk-cd POST Data (JSON):

Parameter Name
Type
Description
Required

href

String

Page URL that triggers kasada verification

Yes

st

Integer

x-kpsdk-st returned by ct API

Yes

ct

String

x-kpsdk-ct returned by ct API

Yes

x-kpsdk-ct json example

{
    "href": "https://api.crowdgen.com/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/fp?x-kpsdk-v=j-1.1.0",
    "fp_host": "api.crowdgen.com",
    "fp_html": "<!DOCTYPE html><html><head></head><body><script>window.KPSDK={};KPSDK.now=typeof performance!=='undefined'&&performance.now?performance.now.bind(performance):Date.now.bind(Date);KPSDK.start=KPSDK.now();window.parent.postMessage('KPSDK:MC:CiQxM2RlOTc1Ni1kNmMyLTQ3MDItOTFkZC1hOGUzZDdjOGJjYWU:DllWUiZYDA...",
    "ips_script": "KPSDK.scriptStart=KPSDK.now();\"use strict\";(function(){var C=function(v,u,f){for(var a=u.length,r=a-f,t=[],M=0;M<v.length;)for(var h=0,l=1;;){var x=u.indexOf(v[M++]);if(h+=l*(x%f),x<f){t.push(h|0);break}h+=f*l,l*=r}return t};var s=\"7CI1IKIJIjIAIYIWInIbI4a=5=1<C=1+Z1<C=11N+<C=1K1<C=1Jv+<C=1j8K<C=1A3I...",
    "ips_headers": {
        "via": "1.1 53b2bbb13e5db590d598ee4e9aa9bd80.cloudfront.net (CloudFront)",
        "x-cache": "Miss from cloudfront",
        "p3p": "CP=\"This site does not specify a policy in the P3P header\"",
        "access-control-expose-headers": "x-kpsdk-ct,x-kpsdk-r,x-kpsdk-c",
        "x-kpsdk-r": "1-AA",
        "x-kpsdk-ct": "0ICFRuAoYP3moorFdO2iQq6vhcbHNSygkrDoKFyMREAOjqIRlqlpNMeiyLrd7Pu290rhSTvDyf62nhOZ132LVkI0SZktfWzlGDUS0DJbevip5kghoBdRhf77kApVef89UEOCAYbs6TTKraEhuQapM5FWvU57ixfMj58hSiIR",
        "x-amz-cf-id": "zgHjq3UDbJQexs6W2cdIclz8PSWGffqvOvZWTdexO9nKJMLlUIIX0Q==",
        "pragma": "no-cache",
        "expires": "0",
        "cache-control": "no-cache, no-store, must-revalidate",
        "set-cookie": "KP_UIDz-ssn=0ICFRuAoYP3moorFdO2iQq6vhcbHNSygkrDoKFyMREAOjqIRlqlpNMeiyLrd7Pu290rhSTvDyf62nhOZ132LVkI0SZktfWzlGDUS0DJbevip5kghoBdRhf77kApVef89UEOCAYbs6TTKraEhuQapM5FWvU57ixfMj58hSiIR; Max-Age=86400; Path=/; Expires=Sat, 07 Jun 2025 09:02:51 GMT; HttpOnly; Secure; SameSite=None",
        "date": "Fri, 06 Jun 2025 09:02:51 GMT",
        "x-amz-cf-pop": "HKG62-C2",
        "content-type": "application/javascript; charset=utf-8"
    },
    "cookies": {
        "KP_UIDz-ssn": "0ICFRuAoYP3moorFdO2iQq6vhcbHNSygkrDoKFyMREAOjqIRlqlpNMeiyLrd7Pu290rhSTvDyf62nhOZ132LVkI0SZktfWzlGDUS0DJbevip5kghoBdRhf77kApVef89UEOCAYbs6TTKraEhuQapM5FWvU57ixfMj58hSiIR",
        "KP_UIDz": "0ICFRuAoYP3moorFdO2iQq6vhcbHNSygkrDoKFyMREAOjqIRlqlpNMeiyLrd7Pu290rhSTvDyf62nhOZ132LVkI0SZktfWzlGDUS0DJbevip5kghoBdRhf77kApVef89UEOCAYbs6TTKraEhuQapM5FWvU57ixfMj58hSiIR"
    },
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
    "iframe": true,
    "submit": false,
    "is_auth": false
}

x-kpsdk-cd json example

{
    "href": "https://xxxxxx/",
    "st": 1716775584627,
    "ct": "value of x-kpsdk-ct"
}

x-kpsdk-ct Response Data (JSON):

Parameter Name
Type
Description

status

Integer

Whether the call was successful, 1 for success, 0 for failure. Use this value to judge

msg

String

Chinese description of the result

id

String

The unique request ID for this particular request (can be used for subsequent record queries)

data['x-kpsdk-ct']

String

The available x-kpsdk-ct parameter returned after successful verification, can be used in request headers for subsequent verification APIs

data['x-kpsdk-st']

String

Used for subsequent kasada/cd API to generate x-kpsdk-cd parameter, bound with x-kpsdk-ct parameter

data['x-kpsdk-cd']

String

The available x-kpsdk-cd parameter returned after successful verification, please recall kasada/cd API to generate this parameter when using ct multiple times

data['headers']

Object

/tl API request header parameters

data['post_data']

Object

/tl API request body base64 string, please base64 decode before use

cost

String

Verification time taken (in milliseconds)

x-kpsdk-cd Response Data (JSON):

Parameter Name
Type
Description

status

Integer

Whether the call was successful, 1 for success, 0 for failure. Use this value to judge

msg

String

Chinese description of the result

id

String

The unique request ID for this particular request (can be used for subsequent record queries)

data['x-kpsdk-cd']

String

The available x-kpsdk-cd parameter returned after successful verification, can be used in request headers for subsequent verification APIs (can only be used once)

cost

String

Verification time taken (in milliseconds)

{
  "status": 1,
  "msg": "验证成功",
  "id": "639e056b-49bd-4895-94ab-68d59e00873e",
  "cost": "4635.12ms",
  "data": {
    "x-kpsdk-st": 1716775584627,
    "x-kpsdk-cd": "{\"workTime\":1716775584627,\"id\":\"e7910834208cfc67a3340ff934bdb5b1\",\"answers\":[9,9],\"duration\":39,\"d\":1886,\"st\":1716775584814,\"rst\":1716775586700}", 
    "x-kpsdk-ct": "0aTWZlyuZj8xdBYhR3kCblUF4ljSLJNyk8LWEbjERVaayHo5DUU5VTEh7NWYldd5brUpu0KHOR38y2H6ObgzziQA28FKq4i5DX14UVmY93efP2ejJNYybda4Tmqc6v2EscnP4K3tEAxP1a7uUtPEXMuTYutYLhSrDxOEzJa"
  }
}
{
  "status": 1,
  "msg": "验证成功",
  "id": "639e056b-49bd-4895-94ab-68d59e00873e",
  "cost": "1635.12ms",
  "data": {
    "headers": {
      "x-kpsdk-im": "CiRmOTgyZTY5Yy0wMDZhLTQ1YzEtYjllZS03NzY2MWY5NDIzZjg",
      "x-kpsdk-ct": "0KbYqxscaXy3q8xoCxrGhYnKwCX08pVkjSQJ45g7hZhzvyvemuDkgGpv5eV3B6vV2UhWOuE8NInnv8oBcxlmqFk8gOAquRxuv5vl7m4O9qqnOwdBBWY7ufrBz6kdDpSOn9cYuiWkpad71lKwUszx7KzLHDcqQxx3ccwPTnYd",
      "x-kpsdk-dt": "1020nz6ax72z29w4lw11uow37w5f",
      "x-kpsdk-v": "j-0.0.0"
    },
    "post_data": "AAJCeP3chaEwAOtGnFweH7CtiQg6SEq6+Ac2LsHnl9G7s/Um5fyD8JYFmAm4y8baB9QnOqD6dtZph7hASmoioSgynFqOhG18d/xHSSeMiHU7aKDLquNYVXYZ34kxgu/Dw1/D5sj

Last updated