Skip to content
Troubleshooting

DataDome blocking requests — how to pass the shield

Requests that worked yesterday now return 403 or a DataDome-branded challenge page. The HTML reads something like "Please enable JavaScript" or shows a slide-to-verify widget that doesn't complete.

Cause

DataDome runs a JS challenge whose result is gated behind a datadome cookie. The first request triggers the challenge; subsequent requests carry the cookie and are accepted. Bots without a valid cookie hit the 403 path or the captcha page.

Fix

Fetch the cookie via Sonic once per (origin × fingerprint × proxy IP), then attach it to subsequent requests. Cookies are valid for about an hour — cache across requests within that window instead of re-solving each time.

Runnable example
from captchasonic import CaptchaSonic
import requests

sonic = CaptchaSonic('YOUR_API_KEY')
result = sonic.solve(
    type='DataDomeTask',
    website_url='https://target.example.com/protected',
    user_agent='Mozilla/5.0 (...)',
    proxy={'type': 'http', 'host': '...', 'port': 8080},
)

session = requests.Session()
session.cookies.set('datadome', result.cookie, domain='target.example.com')
r = session.get('https://target.example.com/protected/list')

Frequently asked questions

Usually around 1 hour per origin, fingerprint, and IP. Cache across requests within that window — re-solving on every call is wasted spend.

No — DataDome's cookie validates as long as the user-agent + IP match what the cookie was issued for. A bare requests.Session works once the cookie is set.

Fetch a new cookie when the proxy IP changes — DataDome binds the cookie to the egress IP. Cycle the solve hop every time your proxy hops.

Related guides