Skip to content
Guide

Akamai sensor_data Invalid: Why _abck Stays at ~-1~ and How to Fix the 403

NSLSolver TeamPublished Updated 8 min read

When Akamai Bot Manager rejects your sensor_data, the _abck cookie stays in its unvalidated ~-1~ state and protected requests get a 403. The rejection is rarely about one field in the payload: Akamai scores the sensor data together with the client that sends it, so a mismatched TLS or HTTP/2 fingerprint, a different IP or User-Agent, a missing bm_sz, or replayed sensor data all end the same way.

To fix it, keep the whole session on one sticky IP and one User-Agent, send it from a client that looks like that Chrome version at the TLS and HTTP/2 level, carry every cookie Akamai sets, and generate sensor data fresh for each session. If you would rather not maintain a sensor generator, get the cookies from a solver. Akamai does not document the _abck format, so this guide relies on public write-ups and on what you can observe in DevTools.

Quick answer: match your symptom to the fix

These are the cookie values and responses people paste into search when Akamai Bot Manager keeps blocking them. Find yours:

_abck stays at ~-1~ after the sensor POSTs
The sensor payloads were not accepted, so the cookie never reached a validated state. The data, the client that sent it, or the IP looked wrong. Check the TLS/HTTP2 fingerprint, the User-Agent and the IP before touching the payload.
_abck changed to a value ending in ~0~-1~-1 (or similar) mid-session
Hyper Solutions' SDK docs describe this as an invalidated cookie set by the server. The same docs say one more sensor post should make it valid again. Re-run the sensor in the same session instead of starting over.
403 with an "Access Denied" page and a "Reference #" number
The Akamai edge denied the request outright. Valid cookies alone will not help if the IP or client fingerprint is flagged. Fix those, then get fresh cookies.
200 OK, but the body is a challenge page, not content
ScrapeBadger observed Akamai's behavioural challenge being served with HTTP 200 while the sensor runs. Do not treat 200 as success. Check the body and the _abck state.
Cookies valid in Chrome, 403 when replayed in python-requests
Your client's TLS and HTTP/2 fingerprint does not match the browser that earned the cookies. Replay with a Chrome-impersonating client such as curl_cffi, same User-Agent, same IP.
Blocked right after rotating the proxy
The cookies were earned from another exit IP. Use a sticky session: one cookie set per IP.
Generated sensor_data worked once, now always rejected
Replayed or stale sensor data: Scrapfly notes requests fail when "the cookie and sensor timeline is incoherent". Generate sensor data fresh for each session, with the current bm_sz and _abck.

Akamai does not publish the _abck format or the sensor protocol. The states above come from public write-ups by Hyper Solutions, ScrapeBadger, Scrapfly, Scrappey and Bright Data, checked on 2026-12-01; HTTP/2 fingerprinting is described in Akamai's own white paper. Sources are listed at the end of the article.

This error has an entry in our anti-bot error-code reference, next to every other Cloudflare, Turnstile, Kasada, Akamai and reCAPTCHA error.

How the sensor and the _abck cookie work together

On a Bot Manager site the page loads a first-party script from a path of several random segments with no file extension, on the site's own host. ScrapeBadger traced it: the script collects browser data and POSTs its payload, widely called sensor_data, back to the same path; on one site the page posted four times in the first four seconds. Each accepted post can update the _abck cookie, and protected endpoints only let requests through when _abck is in a validated state.

Bright Data describes _abck as "a long-lived cookie used for behavioral tracking and risk scoring", and ak_bmsc as "a short-lived session cookie" that expires within a few hours. Akamai's own cookie notice lists _abck, bm_sz, ak_bmsc and bm_sv as first-party cookies but does not describe their contents. For how to recognise Akamai and replay its cookies in Python and Node.js, see our guide to Akamai Bot Manager and the _abck cookie.

What the _abck states mean

The value is a string with fields separated by ~. Public write-ups read the second field as Akamai's verdict. Treat this as community understanding, not documentation: ScrapeBadger found no published format, and Scrapfly warns against inferring fixed fields.

What you seeCommon readingWhat to do
~-1~ before any sensor postNew, not yet validated session (Scrappey)Normal. Let the sensor run or get cookies from a solver
~-1~ after several sensor postsThe sensor data was not acceptedFix the client, IP and timeline (below); the payload is rarely the only issue
~0~Commonly read as validated (Scrappey); Hyper Solutions' SDK advises stopping sensor posts once the cookie is validSend it with every request, from the same IP and client
Ends in ~0~-1~-1 or similar after being validInvalidated by the server (Hyper Solutions SDK docs)One more sensor post in the same session should restore it

A ~0~ is not a guarantee: ScrapeBadger notes that "cookie presence does not mean you have been blocked" and that results vary by deployment. Always check the actual response.

Why sensor_data gets rejected

Scrapfly sums up the problem: a payload with "contradictory environment, timing, or identity values" draws scrutiny, and a request "can include all expected headers and still fail because the cookie and sensor timeline is incoherent". In practice the causes are:

  • Client mismatch: the sensor claims Chrome on Windows, but the TLS handshake and HTTP/2 frames come from python-requests, Node or Go. Scrapfly notes that a non-browser TLS profile can contribute to failure before the payload is even parsed.
  • Session mismatch: the sensor was built for a different session. Hyper Solutions' SDK takes the bm_sz value as an input when generating sensor data, so the sensor, bm_sz and _abck must all belong to the same visit.
  • Replayed or stale sensors: the same payload posted twice, or posted long after the page loaded, does not fit a real timeline.
  • IP change: Scrappey lists _abck or bm_sz cookies "from the previous response sent from a different IP" as a sign of shared cookies.
  • IP reputation: Scrappey describes datacenter ranges as pre-scored low, with residential and mobile IPs starting higher.

Fix 1: make TLS and HTTP/2 match the User-Agent

Akamai's own researchers published a white paper on passive HTTP/2 fingerprinting (Black Hat Europe 2017). It shows that clients differ in which SETTINGS parameters they send, their order and values, the WINDOW_UPDATE increment, PRIORITY frames and the order of pseudo-headers such as :method and :path. Those differences identify the client library regardless of the User-Agent string.

So the HTTP client that posts the sensor and replays the cookies has to look like the Chrome version in your User-Agent. curl_cffi with impersonate="chrome" reproduces a Chrome TLS and HTTP/2 fingerprint; keep the User-Agent on the same Chrome major version as the impersonation target. ScrapeBadger found that no impersonation profile it tested matched the newest Chrome exactly, so test against your target rather than assuming.

abck_state.py
# abck_state.py  (pip install curl_cffi)
# Akamai does not document the _abck format. This reads the second
# '~'-separated field the way public write-ups do: '0' is commonly seen
# on validated cookies, '-1' on cookies that are not (or no longer) valid.
from curl_cffi import requests

def abck_flag(value: str) -> str | None:
    parts = value.split("~")
    return parts[1] if len(parts) > 2 else None

s = requests.Session(impersonate="chrome")
r = s.get("https://protected-site.example.com/", timeout=30)
abck = s.cookies.get("_abck")
print("status", r.status_code, "server", r.headers.get("server"))
print("_abck flag:", abck_flag(abck) if abck else "no _abck yet")
print("bm_sz set:", "bm_sz" in s.cookies, " ak_bmsc set:", "ak_bmsc" in s.cookies)

Fix 2: one IP, one User-Agent, every cookie

  • Use a sticky proxy session. The sensor, the cookies and every protected request must leave through the same exit IP.
  • Never change the User-Agent within a session, and never mix headers from different browsers.
  • Keep a cookie jar. Send _abck, bm_sz, ak_bmsc and any bm_* cookies the site sets (ScrapeBadger saw bm_mi, bm_so and bm_sv too), and let the jar update them as responses arrive.
  • Load the page that runs the sensor before calling the protected API, as a browser would.
  • Detect blocks on every response (403, or a 200 whose body is a challenge page), re-validate once, retry once, and stop if it still fails.

Fix 3: generate sensor data fresh, from a current script

If you generate sensor_data yourself, build it per session from the current bm_sz and _abck, post it at a believable pace after the page load, and stop once the cookie validates. Hyper Solutions' SDK exposes exactly that logic: IsCookieValid tells the client to halt sensor submissions once the cookie is valid, and IsCookieInvalidated detects the ~0~-1~-1 case that one more post can fix.

If you drive a real browser instead, the sensor builds itself, but the browser has to pass: automation flags, headless mode and datacenter IPs are scored like any other signal.

When to stop maintaining a sensor generator

A sensor generator is ongoing work: an obfuscated script to follow, per-site differences, and a TLS and HTTP/2 layer that has to match. If your goal is the data behind the wall rather than the generator, get validated cookies from an API and spend your effort on replaying them correctly. Our Akamai Bot Manager bypass guide compares the routes.

NSLSolver supports Akamai Bot Manager in beta. POST to https://api.nslsolver.com/solve with type "akamai", the url of a page that loads the Akamai script, your user_agent and your proxy; both are required. The response returns cookies, including _abck and bm_sz. A solve averages about 15 seconds and costs $2.00 per 1,000 solves, only successful solves are billed, and sign-ups with Google, Gmail or Proton get $0.10 of free credit (about 125 Turnstile solves). See the Akamai solver API page and pricing for details.

Replay the cookies through the same proxy, with the same User-Agent, from a Chrome-like client. Only automate sites you own or are authorised to access.

akamai_cookies.py
# akamai_cookies.py  (pip install requests curl_cffi)
import os
import requests
from curl_cffi import requests as cffi

UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36"
PROXY = "http://user:pass@sticky-proxy.example.com:8080"  # sticky: same exit IP throughout

r = requests.post(
    "https://api.nslsolver.com/solve",
    headers={"X-API-Key": os.environ["NSLSOLVER_API_KEY"]},
    json={
        "type": "akamai",
        "url": "https://protected-site.example.com/login",  # page that loads the sensor script
        "user_agent": UA,   # required for akamai
        "proxy": PROXY,     # required for akamai
    },
    timeout=120,
)
data = r.json()
if r.status_code != 200 or not data.get("success"):
    raise RuntimeError(f"solve failed: {r.status_code} {data}")

# Replay ALL returned cookies with the SAME proxy and User-Agent,
# from a client whose TLS/HTTP2 matches that Chrome version.
s = cffi.Session(impersonate="chrome")
s.headers["User-Agent"] = UA
s.proxies = {"http": PROXY, "https": PROXY}
for name, value in data["cookies"].items():   # _abck, bm_sz, ...
    s.cookies.set(name, value)
print(s.get("https://protected-site.example.com/api/products", timeout=30).status_code)

Related guides

Frequently asked questions

What does ~-1~ in the _abck cookie mean?

Akamai does not document it, but public write-ups read the second ~-separated field as the verdict: -1 means the session is not validated. It is normal before the sensor runs; if it stays -1 after the sensor posts, the sensor data was not accepted.

Why is my sensor_data rejected?

Usually because something around it is inconsistent: a client whose TLS or HTTP/2 fingerprint does not match the User-Agent, a different IP, a sensor built for another bm_sz, or a replayed or stale payload. Fix the session consistency before rewriting the payload.

What do bm_sz and ak_bmsc do?

Akamai lists both as first-party cookies without describing them. Bright Data calls ak_bmsc a short-lived session cookie that expires within hours. Hyper Solutions' SDK uses bm_sz as an input to sensor generation, so it must belong to the same session as the sensor and _abck.

Can I reuse an _abck cookie on another proxy?

Not reliably. Cookies sent from a different IP than the one that earned them look like shared cookies. Use a sticky proxy and keep one cookie set per IP.

Does Akamai check HTTP/2 fingerprints?

Akamai researchers published a white paper on passive HTTP/2 fingerprinting using SETTINGS values and order, WINDOW_UPDATE, PRIORITY frames and pseudo-header order. Use a client that reproduces Chrome at that layer.

My _abck shows ~0~ but I still get 403. Why?

A validated cookie does not override an edge block for a flagged IP or a non-browser client, and some endpoints are stricter than others. Check the IP, the client fingerprint and that you send the cookie from the same session that earned it.

How much does NSLSolver's Akamai API cost?

$2.00 per 1,000 successful solves, with an average solve time of about 15 seconds. Akamai support is in beta, user_agent and proxy are required, failed solves are not billed, and sign-ups with Google, Gmail or Proton get $0.10 of free credit (about 125 Turnstile solves).

Get validated Akamai cookies without a sensor generator

Send the URL, your User-Agent and proxy, get back _abck, bm_sz and the rest. Beta, $2.00 per 1,000 successful solves, free credit with Google, Gmail or Proton sign-up.