Browse documentation
Guides
Resolve “Sign in to confirm you’re not a bot” with nightly, Deno, a valid session and a working exit IP.
On this page
Start with these four checks
- Update nightly. Upgrade the failing worker, then retest one source.
- Check Deno. Confirm the runtime appears in the verbose log.
- Try a valid session. Browser cookies can help with a small download job.
- Test another exit IP. If the same public source works there, move jobs off the flagged route.
Different message? Choose the right fix
| Message or behavior | Where to go next |
|---|---|
Sign in to confirm you’re not a bot / LOGIN_REQUIRED | Verify nightly and Deno, then compare exit IPs and a valid session. |
The provided YouTube account cookies are no longer valid | Replace the exported session using the renewal procedure below. |
| HTTP 429 | Pause the affected exit and lower request frequency; use the separate 429 guide. |
Could not copy Chrome cookie database / Failed to decrypt with DPAPI | Fix the local cookie-loading failure; the intended authenticated request has not happened yet. |
| Formats selected, then media HTTP 403 | Follow the 403 guide for concurrency, IP and media-request context. |
1. Update and test one source
python -m pip install -U --pre "yt-dlp[default,curl-cffi]"
python -m yt_dlp --version
deno --versionUse Deno 2.3+ and confirm its detection in the verbose log; it is required by this workflow. The [default] extra provides the matching EJS solver. For an official standalone binary, use yt-dlp --update-to nightly and replace python -m yt_dlp with yt-dlp. Keep the same source and network for both tests below.
python -m yt_dlp --ignore-config --js-runtimes deno --impersonate="" --verbose --no-playlist \
--simulate "https://www.youtube.com/watch?v=jNQXAC9IVRw"python -m yt_dlp --ignore-config --js-runtimes deno --impersonate="" --verbose --no-playlist \
--cookies-from-browser firefox --simulate "https://www.youtube.com/watch?v=jNQXAC9IVRw"| A / B result | What to change |
|---|---|
| A works; B fails | Remove unnecessary cookie options from your public-video job. The selected session or authenticated client path is introducing the failure. Renew it only for work that needs account access. |
| A fails; B works | Keep that working session source in the job. For a headless worker, export the session with the procedure below and retest on the worker. |
| B cannot copy/decrypt cookies | Resolve the local browser-file error first. You have not tested authenticated access yet. |
| Both fail on the server; the same test works locally | Check the worker's runtime/config, then compare its outbound network and total request volume. |
| Both fail for one source; a public control succeeds | Check the exact source's availability and the account's access. A different public video succeeding does not establish access to this one. |
Keep old player_client overrides out of this baseline. The authenticated and anonymous default clients can differ. Supplying cookies is therefore a meaningful change to both session context and client selection, not simply adding a universal unlock flag.
2. Replace a persistently flagged IP
Use this branch when many public videos fail on one worker but the same configuration succeeds elsewhere. Test a fresh source extraction and media download through a different host or proxy exit. Changing the source IP is the practical recovery when that IP is the condition YouTube keeps rejecting.
python -m yt_dlp --ignore-config --js-runtimes deno --impersonate="" --verbose --no-playlist \
--proxy "http://USER:PASSWORD@HOST:PORT" -f ba -o "diagnostics/%(id)s-%(epoch)s.%(ext)s" \
"https://www.youtube.com/watch?v=jNQXAC9IVRw"Verify the replacement really has a different exit IP. Proxy services can keep the same exit behind a changed gateway or username. For large collections, keep a pool of tested exits, limit concurrency per exit and move new jobs away from a flagged one. Rotate before a new extraction or after a failed job, not between the player request and its media transfer.
| Comparison | Action |
|---|---|
| New exit works; old exit still asks for sign-in | Keep the working route and cool down/quarantine the old exit. More retries on the old exit do not renew its reputation. |
| Cookies work for a few videos | Use that session for the small job. Do not scale by sharing it across many busy workers. |
| Browser works at home; worker still fails | The home IP/session is not the server IP/session. Repeat the same one-video test on the worker's actual route. |
| A specific video fails on every route | Verify that source's availability and account requirements separately from the public-video control. |
A browser cookie workaround is useful for limited downloads, but a large dataset cannot depend on continually finding and refreshing many account sessions. For bulk public-video work, invest in exit-IP quality, rotation and per-IP pacing. Keep cookies for access that needs an account; a proxy does not grant private-video access.
python -m yt_dlp --ignore-config --js-runtimes deno --impersonate="" --verbose --no-playlist \
--force-ipv4 -f ba -o "diagnostics/%(id)s-%(epoch)s.%(ext)s" \
"https://www.youtube.com/watch?v=jNQXAC9IVRw"4. Renew an expired session
The provided YouTube account cookies are no longer valid
playability status: LOGIN_REQUIREDFor a saved cookie file, upstream recommends exporting a dedicated private session and then leaving that session closed. A normal YouTube tab can rotate the session after export. Use this sequence:
- Open a new private/incognito window and sign into the account that can access the source.
- In that same tab, open https://www.youtube.com/robots.txt. Keep it as the only tab in the private session.
- Export youtube.com cookies from that private session using a cookie-export extension linked in the upstream FAQ, with access to private/incognito windows enabled.
- Close the entire private window after exporting. Do not keep using that exported session in the browser.
- Store the export privately and run the single-source test with --cookies pointing to the new file.
Combining --cookies-from-browser with --cookies exports the ordinary browser profile; it does not capture that private session. Changing the file's expiry columns also does not renew a session that the server has invalidated.
python -m yt_dlp --ignore-config --js-runtimes deno --impersonate="" --verbose --no-playlist \
--cookies private/youtube-cookies.txt -f ba -o "diagnostics/%(id)s-%(epoch)s.%(ext)s" \
"https://www.youtube.com/watch?v=jNQXAC9IVRw"If the invalid-cookie warning remains, confirm the worker received the newly exported file and that the export came from the intended private session. If the warning disappears but LOGIN_REQUIRED remains, move to the network/source comparison below. If media selection succeeds and the transfer now returns 403, use the GVS-token and transfer checks.
Linux / Docker: copy a read-only cookie secret
--cookies is also an output path: yt-dlp saves its cookie jar when the instance closes. Pointing it directly at a read-only secret can produce a filesystem error, even after a transfer. Multiple workers writing the same exported file can also overwrite each other's state.
Keep the supplied export private and copy it into each job's temporary directory. The following Python example uses Deno for challenges and downloads one audio stream. Replace the cookie-file path with your mounted secret path; no API key is required.
from pathlib import Path
from shutil import copyfile
from tempfile import TemporaryDirectory
from yt_dlp import YoutubeDL
from yt_dlp.networking.impersonate import ImpersonateTarget
source_cookie_file = Path("/run/secrets/youtube-cookies.txt")
with TemporaryDirectory(prefix="yt-session-") as temporary:
job_cookies = Path(temporary) / "cookies.txt"
copyfile(source_cookie_file, job_cookies)
options = {
"cookiefile": str(job_cookies),
"js_runtimes": {"deno": {}},
"impersonate": ImpersonateTarget(),
"noplaylist": True,
"format": "ba",
"outtmpl": "downloads/%(id)s.%(ext)s",
}
with YoutubeDL(options) as downloader:
downloader.download(["https://www.youtube.com/watch?v=jNQXAC9IVRw"])For a long-running service, distribute a fresh export through your existing secret-management process and start new jobs with it. Do not blindly share one mutable cookie file across concurrent jobs. Keep any session renewal separate from the successful-download archive.
PO-token provider loaded, but still blocked
Inspect whether the provider was merely discovered or actually generated a token. For a GVS token, the extractor normally needs a usable player result first. If that client returns LOGIN_REQUIRED earlier, it may never reach the media-token request.
| Log evidence | Next action |
|---|---|
PO Token Providers lists bgutil, but the log shows no token generation | Read preceding player errors. A loaded plugin is not evidence of successful authentication or token generation. |
Error reaching GET … /ping | Fix the service address. In a worker container, localhost is the worker; use the provider service name on a shared network. |
Generating a gvs PO Token followed by LOGIN_REQUIRED | Verify the session and the worker route. Reinstalling the same provider does not change the account or outbound network. |
| Token generated, formats selected, then media 403 | Check the selected client's token context and extraction/transfer route in the 403 guide. |
The provider project documents a datacenter case where a token was generated and the sign-in error persisted. That is why the success check must include the player response and a real media transfer, not only the provider startup line.
Resume with fewer requests
The separate message This content isn't available, try again later is documented upstream as a guest/account request-rate limit. Stop the workers using that session, retain their failed IDs and let the rejection clear before retrying a single source. There is no useful reason to replay the full manifest while every item gets the same response.
python -m yt_dlp --ignore-config --config-locations yt-dlp-work.conf -t sleep --retries 3 \
--fragment-retries 3 --batch-file urls.txt| Control | What changes |
|---|---|
| -t sleep | Applies yt-dlp's pacing preset within this process. Inspect the verbose configuration for the effective sleep values. |
| --sleep-requests | Pauses extraction requests. Relevant to metadata/player requests, including workflows that never download media. |
| --sleep-interval | Waits before media downloads. It does not pace a separate tight loop of metadata-only requests. |
| --limit-rate | Limits transfer bandwidth; it does not limit player-query frequency. |
| Queue concurrency | Limits the combined work across your processes. Ten paced workers can still overlap through one session. |
Keep the application retry budget separate from yt-dlp's retry settings. Ten job retries, each launching another downloader with its own retries, can multiply the requests. Treat an expired session as a renewal task and a persistently unavailable source as a failed item, rather than immediately requeuing both.
Check that the original failure is resolved
- Cookie-load failure: verify copying/parsing/decryption succeeds before interpreting YouTube's response.
- Invalid session: verify the invalid-cookie warning disappears and the exact source produces a usable player response.
- Provider failure: verify discovery, service reachability and a token-generation event when required.
- Download failure: verify the intended video/audio stream actually reaches the output file; simulation alone is not completion.
- Collection failure: resume one worker with the existing archive and inspect failed items before restoring the normal queue.
Do not use cache deletion, certificate-check disabling or an arbitrary User-Agent as substitutes for these checks. They do not renew a server-rejected session or decrypt a browser database. Keep the exact working change and dependency versions with the worker configuration.