> ## 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.

# Earn your first reese84 token

> Go from an empty project to a valid reese84 cookie on a site behind Imperva. About fifteen minutes.

**What you will build.** A small script that finds Imperva's sensor script on a page, fetches it, asks Roolink for the complete submission, posts it to the site, and stores the token the site hands back as a cookie. From then on the site treats your session like a browser that ran the script.

**What you need.** A Roolink account with an API key, a residential proxy that keeps the same IP for a session, [powhttp](https://docs.roolink.io/capture-requests.md) installed, and Python, Go or Node. Imperva is plain JSON over HTTPS, so no Roolink SDK is involved; the examples call the API with your language's standard HTTP client.

> [accordion] Words used on this page
>
> * **Imperva** (also called Incapsula, its earlier name) is the protection in front of the site. It runs a sensor script in the browser and issues a token to browsers whose results look real.
> * **Reese84** is the name of that sensor. The token it produces is stored in a cookie called `reese84`.
> * **The submission** is the JSON body the browser posts after running the script. Roolink builds the whole thing for you.
> * **GPC** is a small proof-of-work puzzle some sites add on top. When a site uses it, you fetch the puzzle and pass it to Roolink, which solves it while building the submission.
> * **UTMVC** is Imperva's other cookie challenge, older and simpler. It has its [own page](https://docs.roolink.io/imperva/utmvc.md).

1Set up

Put your API key and proxy URL in environment variables and install a TLS client for your language. Imperva fingerprints the connection like the others, so an ordinary HTTP library fails before the token matters.

Open powhttp, start recording, and load your target page in Chrome. You will copy the headers for the page load, the script load and the submission post from that recording.

```bash Python theme={null}
export ROOLINK_API_KEY="roo_..."
export PROXY_URL="http://user:pass@host:port"

pip install requests typing_extensions git+https://github.com/Nintendocustom/Python-Tls-Client.git@dc08ba51b747511b56d3a418896b7504453d7c27
```

```bash Go theme={null}
export ROOLINK_API_KEY="roo_..."
export PROXY_URL="http://user:pass@host:port"

go get github.com/bogdanfinn/tls-client
```

```bash TypeScript theme={null}
export ROOLINK_API_KEY="roo_..."
export PROXY_URL="http://user:pass@host:port"

npm install tlsclientwrapper
```

2Load the page and find the sensor script

Request the page with the document headers from your recording. The response may be the real page or an interstitial that says "Pardon Our Interruption"; either way it contains the sensor script's URL, in one of two shapes. On most sites it is a plain `<script src="/…">` tag with a random-looking path. On sites that show the interstitial, a small loader assigns it in JavaScript as `scriptElement.src = "…"`. Resolve whichever you find against the page URL.

**You should see** one script URL on the page's own host. Its path is fixed per site but looks like noise.

```python Python theme={null}
import json, os, re
from urllib.parse import urljoin, urlparse
import requests
import tls_client

PAGE = "https://www.example.com/"
UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36"
LANGUAGE = "en-US,en;q=0.9"
ROOLINK = "https://imperva.roolink.io/api/v1"

site = tls_client.Session(client_identifier="chrome_152", random_tls_extension_order=True)
site.proxies = {"http": os.environ["PROXY_URL"]}

def find_script(html):
    m = re.search(r'scriptElement\s*\.\s*src\s*=\s*["\']([^"\']+)["\']', html) or re.search(r'<script[^>]+src=["\'](/[^"\']+)["\']', html)
    return urljoin(PAGE, m.group(1).encode().decode("unicode_escape"))

def main():
    page = send("GET", PAGE, PAGE_HEADERS)
    script_url = find_script(page.text)
    print(page.status_code, script_url)
```

```go Go theme={null}
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"log"
	"net/url"
	"os"
	"regexp"
	"strings"

	http "github.com/bogdanfinn/fhttp"
	tls_client "github.com/bogdanfinn/tls-client"
	"github.com/bogdanfinn/tls-client/profiles"
)

const (
	page     = "https://www.example.com/"
	ua       = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36"
	language = "en-US,en;q=0.9"
	roolink  = "https://imperva.roolink.io/api/v1"
)

var (
	assignment = regexp.MustCompile(`scriptElement\s*\.\s*src\s*=\s*["']([^"']+)["']`)
	scriptTag  = regexp.MustCompile(`(?i)<script\b[^>]*\ssrc\s*=\s*["'](/[^"']*)["']`)
)

func main() {
	jar := tls_client.NewCookieJar()
	site, err := tls_client.NewHttpClient(tls_client.NewNoopLogger(),
		tls_client.WithClientProfile(profiles.Chrome_152),
		tls_client.WithRandomTLSExtensionOrder(),
		tls_client.WithCookieJar(jar),
		tls_client.WithProxyUrl(os.Getenv("PROXY_URL")),
	)
	if err != nil {
		log.Fatal(err)
	}

	html, status := get(site, page, pageHeaders())
	scriptURL := resolve(page, findScript(html))
	fmt.Println(status, scriptURL)
```

```typescript TypeScript theme={null}
import { ModuleClient, SessionClient } from "tlsclientwrapper";

const PAGE = "https://www.example.com/";
const UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36";
const LANGUAGE = "en-US,en;q=0.9";
const ROOLINK = "https://imperva.roolink.io/api/v1";

const moduleClient = new ModuleClient();
const site = new SessionClient(moduleClient, {
  tlsClientIdentifier: "chrome_146",
  withRandomTLSExtensionOrder: true,
  proxyUrl: process.env.PROXY_URL,
});

function findScript(html: string): string {
  const m = html.match(/scriptElement\s*\.\s*src\s*=\s*["']([^"']+)["']/) ?? html.match(/<script[^>]+src=["'](\/[^"']+)["']/i);
  return new URL(JSON.parse(`"${m![1]}"`), PAGE).toString();
}

const page = await send("GET", PAGE, pageHeaders());
const scriptUrl = findScript(page.body);
console.log(page.status, scriptUrl);
```

3Fetch the script and check for a puzzle

Download the script through the same session with the script headers from your recording, and keep the body exactly as received.

Then ask the site whether it wants a proof of work. Post the four characters `{"f":"gpc"}` to the script URL with `?d=<page host>` appended, as `text/plain;charset=UTF-8`. The reply is a JSON string. If it is empty, the site does not use GPC. If it is not, it is the puzzle, base64-encoded; keep it as is. You will hand it to Roolink, which solves it for you.

**You should see** a script body of some tens of kilobytes, and either `""` or a long base64 string from the GPC request.

```python Python theme={null}
    script = send("GET", script_url, SCRIPT_HEADERS)
    host = urlparse(PAGE).hostname
    gpc = send("POST", f"{script_url}{'&' if '?' in script_url else '?'}d={host}", GPC_HEADERS, '{"f":"gpc"}')
    pow_challenge = json.loads(gpc.text)  # "" when the site has no proof of work
    print(len(script.text), bool(pow_challenge))
```

```go Go theme={null}
	script, _ := get(site, scriptURL, scriptHeaders())
	gpcBody, _ := post(site, withD(scriptURL, hostOf(page)), gpcHeaders(), []byte(`{"f":"gpc"}`))
	var powChallenge string
	json.Unmarshal([]byte(gpcBody), &powChallenge) // "" when the site has no proof of work
	fmt.Println(len(script), powChallenge != "")
```

```typescript TypeScript theme={null}
const script = await send("GET", scriptUrl, scriptHeaders());
const host = new URL(PAGE).hostname;
const gpc = await send("POST", withD(scriptUrl, host), gpcHeaders(), '{"f":"gpc"}');
const powChallenge: string = JSON.parse(gpc.body); // "" when the site has no proof of work
console.log(script.body.length, Boolean(powChallenge));
```

4Ask Roolink for the submission

Send Roolink the script body, the script URL, the page URL and, if you got one, the puzzle as `pow`. Roolink returns the complete submission body: a JSON object with `solution`, `old_token`, `error`, `errors` and `performance`. You do not need to look inside it.

Roolink emulates a real Chrome on macOS for this product, so the headers you send the site should describe the same browser. This call is the one that counts against your plan, whether or not it solved a puzzle.

**You should see** a JSON object whose `solution.interrogation.p` is a long encoded string.

```python Python theme={null}
    submission = requests.post(f"{ROOLINK}/payload",
        headers={"x-api-key": os.environ["ROOLINK_API_KEY"]},
        json={"script": script.text, "scriptUrl": script_url, "pageUrl": PAGE, "userAgent": UA, "language": LANGUAGE,
              "pow": pow_challenge or None},
    ).text
```

```go Go theme={null}
	submission := callRoolink("/payload", map[string]any{
		"script": script, "scriptUrl": scriptURL, "pageUrl": page, "userAgent": ua, "language": language,
		"pow": powChallenge,
	})
```

```typescript TypeScript theme={null}
const submission = JSON.stringify(await roolinkPost("/payload", {
  script: script.body, scriptUrl, pageUrl: PAGE, userAgent: UA, language: LANGUAGE, pow: powChallenge || null,
}));
```

5Post it and store the token

Post the submission, unchanged, to the script URL with `?d=<script host>` appended, as `text/plain;charset=utf-8`, with the page as referer and the site as origin, using the submission headers from your recording. The site answers with JSON containing a `token`, a `renewInSec` count and a `cookieDomain`.

Store the token as a cookie named `reese84` on that domain and send it with every request from now on. The site will accept the session until `renewInSec` seconds have passed; run steps 3 to 5 again before then to get a fresh one. Some sites' API calls also want the same token in an `x-d-token` header; your recording will show it if they do.

**You should see** a `200` with a `token` starting with a digit and a colon, and the page loading normally afterwards.

```python Python theme={null}
    reply = send("POST", f"{script_url}{'&' if '?' in script_url else '?'}d={urlparse(script_url).hostname}", SUBMIT_HEADERS, submission)
    result = reply.json()
    site.cookies.set("reese84", result["token"], domain=result.get("cookieDomain", host), path="/")
    print(result["token"][:12], result["renewInSec"])

    real = send("GET", PAGE, PAGE_HEADERS)
    print(real.status_code)
    site.close()

main()
```

```go Go theme={null}
	replyBody, _ := post(site, withD(scriptURL, hostOf(scriptURL)), submitHeaders(), submission)
	var result struct {
		Token        string `json:"token"`
		RenewInSec   int    `json:"renewInSec"`
		CookieDomain string `json:"cookieDomain"`
	}
	json.Unmarshal([]byte(replyBody), &result)
	setCookie(jar, page, "reese84", result.Token, result.CookieDomain)
	fmt.Println(result.Token[:12], result.RenewInSec)

	_, status = get(site, page, pageHeaders())
	fmt.Println(status)
}
```

```typescript TypeScript theme={null}
const reply = await send("POST", withD(scriptUrl, new URL(scriptUrl).hostname), submitHeaders(), submission);
const result = JSON.parse(reply.body);
await site.addCookiesToSession(site.getSession(), PAGE, [{ name: "reese84", value: result.token, domain: result.cookieDomain ?? host, path: "/" }]);
console.log(result.token.slice(0, 12), result.renewInSec);

const real = await send("GET", PAGE, pageHeaders());
console.log(real.status);

await site.destroySession();
await moduleClient.terminate();
```

## The complete file

Four header sets are left for you to fill from your powhttp recording: the page load, the script load, the GPC probe and the submission post. The last two are both posts to the script URL; copy each from the matching request in the recording. Their content types are `text/plain;charset=UTF-8`.

```python quickstart.py theme={null}
import json, os, re
from urllib.parse import urljoin, urlparse
import requests
import tls_client

PAGE = "https://www.example.com/"
UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36"
LANGUAGE = "en-US,en;q=0.9"
ROOLINK = "https://imperva.roolink.io/api/v1"

# Paste each header list from your powhttp recording, in the order shown there.
PAGE_HEADERS = {
    # headers Chrome sent when loading the page
}

SCRIPT_HEADERS = {
    # headers Chrome sent when loading the sensor script
}

GPC_HEADERS = {
    # headers Chrome sent when posting {"f":"gpc"} to the script URL
}

SUBMIT_HEADERS = {
    # headers Chrome sent when posting the submission to the script URL
}

site = tls_client.Session(client_identifier="chrome_152", random_tls_extension_order=True)
site.proxies = {"http": os.environ["PROXY_URL"]}


def send(method, url, headers, data=None):
    """Send headers in exactly the order they are written."""
    site.header_order = list(headers)
    if method == "GET":
        return site.get(url, headers=headers)
    return site.post(url, headers=headers, data=data)


def with_d(url, host):
    return f"{url}{'&' if '?' in url else '?'}d={host}"


def find_script(html):
    m = re.search(r'scriptElement\s*\.\s*src\s*=\s*["\']([^"\']+)["\']', html) or re.search(r'<script[^>]+src=["\'](/[^"\']+)["\']', html)
    return urljoin(PAGE, m.group(1).encode().decode("unicode_escape"))


def main():
    host = urlparse(PAGE).hostname

    # 2. Load the page and find the sensor script
    page = send("GET", PAGE, PAGE_HEADERS)
    script_url = find_script(page.text)

    # 3. Fetch the script and check for a puzzle
    script = send("GET", script_url, SCRIPT_HEADERS)
    gpc = send("POST", with_d(script_url, host), GPC_HEADERS, '{"f":"gpc"}')
    pow_challenge = json.loads(gpc.text)

    # 4. Ask Roolink for the submission
    submission = requests.post(f"{ROOLINK}/payload",
        headers={"x-api-key": os.environ["ROOLINK_API_KEY"]},
        json={"script": script.text, "scriptUrl": script_url, "pageUrl": PAGE, "userAgent": UA, "language": LANGUAGE,
              "pow": pow_challenge or None},
    ).text

    # 5. Post it and store the token
    reply = send("POST", with_d(script_url, urlparse(script_url).hostname), SUBMIT_HEADERS, submission)
    result = reply.json()
    site.cookies.set("reese84", result["token"], domain=result.get("cookieDomain", host), path="/")

    real = send("GET", PAGE, PAGE_HEADERS)
    print(real.status_code, "renew in", result["renewInSec"], "s")
    site.close()


main()
```

```go main.go theme={null}
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"log"
	"net/url"
	"os"
	"regexp"
	"strconv"
	"strings"

	http "github.com/bogdanfinn/fhttp"
	tls_client "github.com/bogdanfinn/tls-client"
	"github.com/bogdanfinn/tls-client/profiles"
)

const (
	page     = "https://www.example.com/"
	ua       = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36"
	language = "en-US,en;q=0.9"
	roolink  = "https://imperva.roolink.io/api/v1"
)

var (
	assignment = regexp.MustCompile(`scriptElement\s*\.\s*src\s*=\s*["']([^"']+)["']`)
	scriptTag  = regexp.MustCompile(`(?i)<script\b[^>]*\ssrc\s*=\s*["'](/[^"']*)["']`)
)

// Paste each header list from your powhttp recording, in the order shown there,
// and repeat that order in http.HeaderOrderKey.
func pageHeaders() http.Header   { return http.Header{ /* page load */ http.HeaderOrderKey: {}} }
func scriptHeaders() http.Header { return http.Header{ /* sensor script */ http.HeaderOrderKey: {}} }
func gpcHeaders() http.Header    { return http.Header{ /* the {"f":"gpc"} post */ http.HeaderOrderKey: {}} }
func submitHeaders() http.Header { return http.Header{ /* the submission post */ http.HeaderOrderKey: {}} }

func main() {
	jar := tls_client.NewCookieJar()
	site, err := tls_client.NewHttpClient(tls_client.NewNoopLogger(),
		tls_client.WithClientProfile(profiles.Chrome_152),
		tls_client.WithRandomTLSExtensionOrder(),
		tls_client.WithCookieJar(jar),
		tls_client.WithProxyUrl(os.Getenv("PROXY_URL")),
	)
	if err != nil {
		log.Fatal(err)
	}

	// 2. Load the page and find the sensor script
	html, _ := get(site, page, pageHeaders())
	scriptURL := resolve(page, findScript(html))

	// 3. Fetch the script and check for a puzzle
	script, _ := get(site, scriptURL, scriptHeaders())
	gpcBody, _ := post(site, withD(scriptURL, hostOf(page)), gpcHeaders(), []byte(`{"f":"gpc"}`))
	var powChallenge string
	json.Unmarshal([]byte(gpcBody), &powChallenge)

	// 4. Ask Roolink for the submission
	submission := callRoolink("/payload", map[string]any{
		"script": script, "scriptUrl": scriptURL, "pageUrl": page, "userAgent": ua, "language": language,
		"pow": powChallenge,
	})

	// 5. Post it and store the token
	replyBody, _ := post(site, withD(scriptURL, hostOf(scriptURL)), submitHeaders(), submission)
	var result struct {
		Token        string `json:"token"`
		RenewInSec   int    `json:"renewInSec"`
		CookieDomain string `json:"cookieDomain"`
	}
	if err := json.Unmarshal([]byte(replyBody), &result); err != nil || result.Token == "" {
		log.Fatalf("submission refused: %s", replyBody)
	}
	setCookie(jar, page, "reese84", result.Token, result.CookieDomain)

	_, status := get(site, page, pageHeaders())
	fmt.Println(status, "renew in", result.RenewInSec, "s")
}

func findScript(html string) string {
	if m := assignment.FindStringSubmatch(html); m != nil {
		if s, err := strconv.Unquote(`"` + strings.Trim(m[1], `"'`) + `"`); err == nil {
			return s
		}
		return m[1]
	}
	if m := scriptTag.FindStringSubmatch(html); m != nil {
		return m[1]
	}
	log.Fatal("sensor script URL not found in page")
	return ""
}

func withD(raw, host string) string {
	u, _ := url.Parse(raw)
	q := u.Query()
	q.Set("d", host)
	u.RawQuery = q.Encode()
	return u.String()
}

func hostOf(raw string) string { u, _ := url.Parse(raw); return u.Hostname() }

func resolve(base, ref string) string {
	u, _ := url.Parse(base)
	r, _ := url.Parse(ref)
	return u.ResolveReference(r).String()
}

func setCookie(jar http.CookieJar, pageURL, name, value, domain string) {
	u, _ := url.Parse(pageURL)
	if domain == "" {
		domain = u.Hostname()
	}
	jar.SetCookies(u, []*http.Cookie{{Name: name, Value: value, Domain: domain, Path: "/", Secure: true}})
}

func callRoolink(path string, body map[string]any) []byte {
	b, _ := json.Marshal(body)
	req, _ := http.NewRequest(http.MethodPost, roolink+path, bytes.NewReader(b))
	req.Header.Set("x-api-key", os.Getenv("ROOLINK_API_KEY"))
	req.Header.Set("content-type", "application/json")
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()
	out, _ := io.ReadAll(resp.Body)
	if resp.StatusCode != 200 {
		log.Fatalf("roolink %s: %d %s", path, resp.StatusCode, out)
	}
	return out
}

func get(c tls_client.HttpClient, u string, h http.Header) (string, int) {
	req, _ := http.NewRequest(http.MethodGet, u, nil)
	req.Header = h
	resp, err := c.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()
	b, _ := io.ReadAll(resp.Body)
	return string(b), resp.StatusCode
}

func post(c tls_client.HttpClient, u string, h http.Header, body []byte) (string, int) {
	req, _ := http.NewRequest(http.MethodPost, u, bytes.NewReader(body))
	req.Header = h
	resp, err := c.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()
	b, _ := io.ReadAll(resp.Body)
	return string(b), resp.StatusCode
}
```

```typescript quickstart.ts theme={null}
import { ModuleClient, SessionClient } from "tlsclientwrapper";

const PAGE = "https://www.example.com/";
const UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/156.0.0.0 Safari/537.36";
const LANGUAGE = "en-US,en;q=0.9";
const ROOLINK = "https://imperva.roolink.io/api/v1";

// Paste each header list from your powhttp recording, in the order shown there.
const pageHeaders = () => ({ /* page load */ });
const scriptHeaders = () => ({ /* sensor script */ });
const gpcHeaders = () => ({ /* the {"f":"gpc"} post */ });
const submitHeaders = () => ({ /* the submission post */ });

const moduleClient = new ModuleClient();
const site = new SessionClient(moduleClient, {
  tlsClientIdentifier: "chrome_146",
  withRandomTLSExtensionOrder: true,
  proxyUrl: process.env.PROXY_URL,
});

async function send(method: "GET" | "POST", url: string, headers: Record<string, string>, body?: string) {
  const options = { headers, headerOrder: Object.keys(headers) };
  return method === "GET" ? site.get(url, options) : site.post(url, body ?? null, options);
}

async function roolinkPost(path: string, body: unknown) {
  const res = await fetch(ROOLINK + path, {
    method: "POST",
    headers: { "x-api-key": process.env.ROOLINK_API_KEY!, "content-type": "application/json" },
    body: JSON.stringify(body),
  });
  if (!res.ok) throw new Error(`roolink ${path}: ${res.status} ${await res.text()}`);
  return res.json();
}

const withD = (url: string, host: string) => { const u = new URL(url); u.searchParams.set("d", host); return u.toString(); };

function findScript(html: string): string {
  const m = html.match(/scriptElement\s*\.\s*src\s*=\s*["']([^"']+)["']/) ?? html.match(/<script[^>]+src=["'](\/[^"']+)["']/i);
  if (!m) throw new Error("sensor script URL not found in page");
  return new URL(JSON.parse(`"${m[1]}"`), PAGE).toString();
}

const host = new URL(PAGE).hostname;

// 2. Load the page and find the sensor script
const page = await send("GET", PAGE, pageHeaders());
const scriptUrl = findScript(page.body);

// 3. Fetch the script and check for a puzzle
const script = await send("GET", scriptUrl, scriptHeaders());
const gpc = await send("POST", withD(scriptUrl, host), gpcHeaders(), '{"f":"gpc"}');
const powChallenge: string = JSON.parse(gpc.body);

// 4. Ask Roolink for the submission
const submission = JSON.stringify(await roolinkPost("/payload", { script: script.body, scriptUrl, pageUrl: PAGE, userAgent: UA, language: LANGUAGE, pow: powChallenge || null }));

// 5. Post it and store the token
const reply = await send("POST", withD(scriptUrl, new URL(scriptUrl).hostname), submitHeaders(), submission);
const result = JSON.parse(reply.body);
if (!result.token) throw new Error(`submission refused: ${reply.body}`);
await site.addCookiesToSession(site.getSession(), PAGE, [{ name: "reese84", value: result.token, domain: result.cookieDomain ?? host, path: "/" }]);

const real = await send("GET", PAGE, pageHeaders());
console.log(real.status, "renew in", result.renewInSec, "s");

await site.destroySession();
await moduleClient.terminate();
```

## If something goes wrong

> [accordion] No script URL in the page
>
> The page is not behind Reese84, or the challenge is served on a different path. Look in your recording for the request that posted a JSON body to a URL ending in `?d=…`; the same URL without the query string is the script.

> [accordion] Roolink answers 422
>
> The `error` message names the cause. `pageUrl` must be an absolute HTTPS URL; `script` must be the untouched body; `pow` must be the raw string from the GPC reply, not something you decoded. An unsupported script build also returns 422; bring the script URL to [Discord](https://discord.gg/rooapi).

> [accordion] The submission comes back without a token
>
> The site refused it. Check that you posted to the script URL with `?d=` set to the script's host, as `text/plain;charset=utf-8`, with the headers from your recording, through the same session that loaded the page. If the site uses GPC, confirm you passed the puzzle to Roolink rather than posting without it.

> [accordion] The page loads once, then blocks again after a while
>
> The token expired. Renew before `renewInSec` elapses by repeating steps 3 to 5 in the same session.

## Next steps

[Reese84 in depth](https://docs.roolink.io/imperva/reese84.md)The interstitial variant, the GPC puzzle, token renewal, and the `x-d-token` header.[UTMVC](https://docs.roolink.io/imperva/utmvc.md)Imperva's other cookie challenge: generate `___utmvc` from the Incapsula script and activate it.[API reference](https://docs.roolink.io/api-reference/imperva/payload.md)Every field of the payload and UTMVC endpoints.


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