Fix "Sign in to confirm your age" in yt-dlp
ERROR: [youtube] dQw4w9WgXcQ: Sign in to confirm your age. This video may be inappropriate for some users.
Quick answer
Most advice online for this error predates 2021, when YouTube closed the endpoint every bypass relied on. What works now is cookies from an account YouTube has confirmed as an adult — and a client that is not separately challenged:
yt-dlp --cookies-from-browser firefox --extractor-args "youtube:player_client=tv" "URL"
Why the old tricks stopped working
Age-restricted videos used to be reachable through an embedded-player endpoint that returned full metadata without checking anything. yt-dlp used it, every guide documented it, and YouTube removed it in 2021.
What replaced it is a straightforward check: the request must carry a session belonging to an account YouTube believes is an adult. Not merely signed in — verified. In several countries that verification requires ID or a payment card, and an account that has not done it is treated exactly like one that is not signed in at all.
Two flags still recommended widely, both of which do nothing here:
-
--age-limit 18— a filter, and one that points the wrong way. It tells yt-dlp to skip anything rated above the number. It was never a bypass. -
--no-check-certificate— TLS verification, entirely unrelated. It appears in this context only because it appears in every copied answer.
Telling this apart from the bot check
Both ask you to sign in and the fixes differ, so read the message:
| Message | What it is | Where to go |
|---|---|---|
| "confirm your age" | Age gate | This page |
| "confirm you're not a bot" | Origin check | Bot check |
| "granted access to this video" | Private video | Private video |
The working approach
1. Sign in, in a browser, on a verified adult account
Play the video there first. If the browser also refuses, the account is not verified and no downloader can substitute for that.
2. Hand yt-dlp the session
yt-dlp --cookies-from-browser firefox "URL"
3. Add a client that is not separately challenged
Cookies satisfy the age check; they do not satisfy the origin check. On age-restricted content you often hit both at once, and need to answer both:
yt-dlp --cookies-from-browser firefox --extractor-args "youtube:player_client=tv" "URL"
If that pairing logs you out of the browser you exported from, use web_safari
instead — the TV client authenticates differently and the mismatch can invalidate the session.
Confirming it worked
yt-dlp --cookies-from-browser firefox --extractor-args "youtube:player_client=tv" --simulate -F "URL"
A format table means the gate cleared. A table that stops at 360p means it cleared and the formats are being withheld for a different reason — PO tokens.
If it still fails
- Cookies load and the gate holds. The account is signed in but not age-verified. Check youtube.com/account for a verification prompt.
- The browser plays it and yt-dlp does not. Wrong profile exported, or the export was from a different Google session than the tab that plays it.
- Only in some countries. Age rules are regional. A video ungated in one country can be gated in another, and the connecting address decides which rules apply.
- It worked last week. Session rotated — re-export. This is routine.
Frequently asked
Why did the old age-gate bypass stop working?
Does my account need to be age-verified?
Is this the same as the bot check?
What does --age-limit actually do?
Related
- yt-dlp Cookies: --cookies-from-browser vs cookies.txt Cookies are how yt-dlp proves it is you — for private videos, members-only content and bot checks. Both method...
- Fix "Sign in to confirm you're not a bot" in yt-dlp YouTube asks yt-dlp to prove it is human when the request looks like a datacentre. Why cookies alone stopped w...
- Fix "Private video: Sign in if you've been granted access" in yt-dlp yt-dlp can download a private video if your account can see it — the trick is handing over the right session....