Skip to main content
Solving the challenge earns you cookies and a session token. For plain page loads that is enough. For the site’s own API calls, the ones the page makes after it loads, Kasada usually asks for one more thing: a small proof of work, computed per request, sent as the x-kpsdk-cd header. The browser computes it in JavaScript; Roolink’s /cd endpoint computes it for you.

When you need it

Look at a protected API request in your powhttp recording. If it carries an x-kpsdk-cd header, every request you make to that endpoint needs one too. If the browser sends only cookies and x-kpsdk-ct, you do not need this page for that endpoint.

What goes into it

The optional /mfc request

Some sites make one extra request after /tl: a GET to /mfc in the same directory as ips.js, carrying x-kpsdk-v and x-kpsdk-h. Its response returns two headers you keep for the rest of the session: x-kpsdk-fc, the feature configuration for the proof of work, and x-kpsdk-h. Make this request only if it appears in your recording. Before the first /mfc, x-kpsdk-h is 01.

The flow, per protected request

1

Generate the proof of work

Call /cd with st, the current ct, domain and, if you have it, fc. Roolink returns a payload string. It is free of side effects and free of charge: it doesn’t count against your plan, though your key still needs an active plan or balance. It takes up to ten seconds at high difficulty.
2

Send the request with the Kasada headers

Make the protected request through the same session with the browser’s headers for that endpoint from your recording. Four of them are Kasada’s: x-kpsdk-v (the SDK version from the /fp URL), x-kpsdk-h, x-kpsdk-ct (the current token) and x-kpsdk-cd (the value you just generated). Keep them in the position the browser had them.
3

Read the response for a new ct

If the response carries an x-kpsdk-ct header, replace your stored ct with it before the next request. st does not change.
4

Repeat for every protected request

One proof of work per request. Never reuse an x-kpsdk-cd value, even for an identical request a second later.

When to start over

A 429 on a protected request means the session is no longer trusted: the cookies expired, the ct went stale, or the IP changed. Do not keep generating proofs of work against it. Go back to the Quickstart flow, solve the challenge again, and continue with the new ct and st.

Request fields

Troubleshooting

Check the four headers are present and in the browser’s order, that ct is the newest you have seen, and that st is the original one from /tl. If all three hold, the session is stale: solve the challenge again.