Skip to content

Start typing. Errors match on their exact yt-dlp output.

to move, to open esc to close

Fix "Sign in to confirm you're not a bot" in yt-dlp

Tested on yt-dlp 2026.07.28 Updated
What yt-dlp prints
ERROR: [youtube] dQw4w9WgXcQ: Sign in to confirm you're not a bot. Use --cookies-from-browser or --cookies for the authentication. See https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp for how to manually pass cookies.

Quick answer

The error text tells you to use cookies. That advice is now incomplete — YouTube added a proof-of-origin check on top of the session check, so cookies alone often produce the same challenge again. Changing which client yt-dlp identifies as clears it far more reliably, and needs no account at all:

try this before reaching for cookies
yt-dlp --extractor-args "youtube:player_client=tv,web_safari" "URL"

What is actually being checked

YouTube runs several different playback clients — the web player, the Android app, the TV interface, and others. Each authenticates differently, and each is trusted to a different degree. yt-dlp can pretend to be any of them, and which one it picks decides whether you get a challenge.

Since 2024 the web client has required a proof-of-origin token: a value generated by YouTube's own JavaScript, in a real browser, that proves the request came from somewhere plausible. yt-dlp cannot manufacture one. When it identifies as the web client without one, the server sees a session that claims to be a browser and cannot prove it — and asks it to sign in to confirm it is not a bot.

This is why the advice in the error message has aged badly. Cookies tell YouTube who you are. They say nothing about where the request came from, and it is the second question failing.

The fixes, in the order worth trying

1. Update, then change client

Which clients work changes every few months, and yt-dlp's defaults change with them. A build more than a few weeks old is often trying a client that stopped working.

bash
yt-dlp -U
yt-dlp --extractor-args "youtube:player_client=tv,web_safari" "URL"

tv is the television interface — the least scrutinised client, and the one that works most often without any credentials. web_safari is the fallback if the first fails. Listing two separated by a comma means yt-dlp tries them in order.

2. Slow the request rate down

The check is not purely per-request. Six extractions in four seconds looks like a script no matter which client you claim to be, and a playlist does exactly that before downloading anything:

bash
yt-dlp --sleep-requests 2 --sleep-interval 5 --max-sleep-interval 15 -i "PLAYLIST_URL"

--max-sleep-interval is what adds jitter. A pause of exactly five seconds between every download is itself a machine signature; a random pause between five and fifteen is not.

3. Then cookies, from a throwaway account

If the video genuinely needs an account — members-only, age-restricted, private — no client switch will substitute for that. Cookies are the answer, with a caveat worth taking seriously.

bash
yt-dlp --cookies-from-browser firefox "URL"

Firefox is the example because Chrome and Edge lock their cookie database while running, which produces a different error entirely. Both methods, and when each one breaks, are in the cookies guide.

4. Combine client and cookies

For members-only content you may need both — the account to have access, and a client that is not challenged:

bash
yt-dlp --cookies-from-browser firefox --extractor-args "youtube:player_client=web_safari" "URL"

Confirming it worked

Test extraction without downloading anything:

bash
yt-dlp --simulate -F "URL"

A format table means the challenge cleared. An empty table, or one with only low-resolution entries, means extraction succeeded but the good formats are still gated — that is the PO token problem, not this one.

If it still fails

  • Only on a VPN or a server. Datacentre IP ranges get the strictest treatment. There is no flag that fixes this; run it from a residential connection, or expect to need cookies plus a working client every time.
  • Right after it worked fine. You tripped a rate limit. Wait an hour — most of these are temporary — and come back with the pacing flags above.
  • Every video, every client, fresh install. Check for a --user-agent in a config file. A copied user-agent string that contradicts the client yt-dlp is claiming is a reliable way to fail this check; --ignore-config will tell you in one run.
  • Nothing works and the video plays in a browser. The client list has moved again. The yt-dlp extractor wiki tracks which clients currently work; it changes faster than any article can.

Frequently asked

Will using cookies get my Google account banned?
It can. YouTube treats a session used by a downloader as suspicious, and accounts have been locked for it. The rule people who do this at any volume follow is simple: never use your main account. Make a throwaway, use it for this only, and accept that it may stop working.
Why did cookies work last month and not now?
Cookies still help, but they are no longer sufficient on their own for the web client. YouTube added a proof-of-origin check on top, and a session without one gets the same challenge a session with no cookies at all would. Switching client is usually the faster fix.
Does a VPN help?
It usually hurts. The check fires hardest on datacentre address ranges, which is exactly what a commercial VPN exit node is. If you are seeing this only while connected to a VPN, disconnect and try again before changing anything else.
I am on a home connection and still get it.
Then it is the request that looks automated, not the address. A stale yt-dlp, a copied --user-agent string that does not match the client being claimed, or a burst of rapid requests will each do it. Update first, remove any user-agent override second.