> ## Documentation Index
> Fetch the complete documentation index at: https://docs.roolink.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Initial block page

> Some Kasada sites answer the very first page load with the challenge. Same flow, one difference in what you send Roolink.

Most Kasada sites let the page load and challenge a hidden `/fp` frame behind it, which is the flow the [Quickstart](https://docs.roolink.io/kasada/quickstart.md) walks through. A smaller number challenge the page itself: your first `GET` to the site returns `429`, and the body is the block page with the `ips.js` script tag in it. Nothing else loads until you solve it.

If you have done the Quickstart, everything on this page will look familiar. The steps are the same; what changes is where the challenge appears and what you tell Roolink about it.

## How to tell the two apart

| | Fingerprint endpoint | Initial block page |
| - | - | - |
| First page load | `200`, real page | `429`, block page containing `ips.js` |
| Where the challenge appears | A hidden frame requests `/<uuid>/<uuid>/fp?x-kpsdk-v=…` and gets `429` | The page URL itself |
| Request type for the challenge | Frame: `sec-fetch-dest: iframe`, referer is the page | Document: `sec-fetch-dest: document`, `sec-fetch-site: none`, no referer |
| `referer` sent to Roolink | The page URL | The page URL |
| After `/tl` | Load the page again | Load the same URL again |

Your powhttp recording settles it in one look: if the very first document request in the recording came back `429`, you are on this page.

## The flow

**1. Load the page and keep the 429**

Request the page with the document headers from your recording. Expect `429`. The body contains exactly one `<script>` tag whose `src` ends in `/ips.js`; resolve it against the page URL. The two random path segments before `ips.js` are Kasada's directory for this site, and `/tl` lives there too.

**2. Fetch the script and ask Roolink for the payload**

Exactly as in the Quickstart: `GET` the script with the script headers, then call `/payload` with `script`, `ipsUrl`, `language`, `userAgent` and `referer`. For this flow `referer` is the page URL that returned the `429`; Roolink uses it as the top-level page, since there is no frame.

**3. Post to /tl**

Post the decoded payload bytes to `/tl` in the script's directory, as `application/octet-stream`, with the browser's `/tl` headers plus the `x-kpsdk-*` headers Roolink returned. Expect `200` with `{"reload":true}`, the `x-kpsdk-ct` and `x-kpsdk-st` response headers, and Kasada's cookies.

**4. Load the same URL again**

Request the page URL again with the same document headers, through the same session. The block page is gone and the real page loads. Sites often redirect once or twice on the same origin at this point; follow those, and treat a redirect to another origin as a failure.

## What changes in the code

Take the Quickstart's complete file and change three things:

* Request `PAGE` instead of `FP` in step 2, with the page-load header set rather than the frame set.
* Drop `FRAME_HEADERS`; there is no frame in this flow.
* In step 5, request `PAGE` and follow same-origin redirects.

Everything else, including the `/payload` call, the `/tl` post and the [proof of work](https://docs.roolink.io/kasada/proof-of-work.md) for protected requests afterwards, is identical.

## Troubleshooting

> [accordion] The first request returns 200, not 429
>
> Then this is not the initial block variant. Look in your recording for a `/fp` request whose body loads `ips.js` and follow the [Quickstart](https://docs.roolink.io/kasada/quickstart.md).

> [accordion] The retry still returns 429 after a successful /tl
>
> The cookies from `/tl` are not being sent. Confirm one jar for the whole flow, and that you are retrying the exact URL that was challenged, not a redirect target from before the challenge.

> [accordion] The retry redirects to another domain
>
> The site moved you off the protected origin, usually a sign that the session is flagged rather than solved. Start again on a fresh sticky proxy session with an empty jar.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.