Kasada

Tip: Use one of the SDKs below instead of directly calling the API.

Generate challenge token (ct)

Generate Kasada payload

post

Generates a payload to be used in the /tl POST request

Header parameters
Content-Typestring · enumRequired

The Content-Type of the request body

Possible values:
x-api-keystringRequired

Your API key for authentication

Body
userAgentstringRequired

The User-Agent string of the browser

ipsLinkstringRequired

The IPS link obtained from the Kasada block page

scriptstringRequired

The Kasada challenge script content

acceptLanguagestringRequired

Your accept-language header.

ipstringRequired

The IP that is used to post the sensor data to the target site. You can use /ip to get the IP from a connection. If you are not using proxies, this will be the IPv4 or IPv6 address of your pc.

Responses
200

OK Payload successfully generated

application/json
{
  "headers": {
    "x-kpsdk-ct": "text",
    "x-kpsdk-dt": "text",
    "x-kpsdk-v": "text",
    "x-kpsdk-r": "text",
    "x-kpsdk-dv": "text",
    "x-kpsdk-h": "text",
    "x-kpsdk-fc": "text",
    "x-kpsdk-im": "text"
  },
  "payload": "text"
}

Generate challenge data (cd)

Get challenge POW

post

Retrieves a challenge POW (x-kpsdk-cd)

Header parameters
Content-Typestring · enumRequired

The Content-Type of the request body

Possible values:
x-api-keystringRequired

Your API key for authentication

Body
stintegerRequired

Timestamp retrieved from the x-kpsdk-st response header of the /tl request

ctstringRequired

Value retrieved from the x-kpsdk-ct response header of the /tl request

workTimeintegerOptional

Custom workTime value if you are generating POWs in advance

fcstringOptional

Only used on specific sites. Inquire if your site makes a GET request to /mfc.

Responses
200

OK POW successfully generated

application/json
{
  "payload": "text"
}

Last updated