# Fix yt-dlp’s “Sign in to confirm you’re not a bot” error

Resolve “Sign in to confirm you’re not a bot” with nightly, Deno, a valid session and a working exit IP.

Canonical reference: https://flashdata.dev/docs/guides/yt-dlp-sign-in-not-a-bot
Reviewed: 2026-11-13 by FlashData

- [New or outdated worker](https://flashdata.dev/docs/guides/yt-dlp-sign-in-not-a-bot/reference.md#baseline) — Check nightly, Deno and the clean baseline
- [Same IP stays blocked](https://flashdata.dev/docs/guides/yt-dlp-sign-in-not-a-bot/reference.md#network) — Replace the exit and control its workload
- [A small job needs cookies](https://flashdata.dev/docs/guides/yt-dlp-sign-in-not-a-bot/reference.md#cookies) — Use a valid browser session
- [The provided YouTube account cookies are no longer valid](https://flashdata.dev/docs/guides/yt-dlp-sign-in-not-a-bot/reference.md#renew-session) — Export and test a fresh session

<a id="first-response"></a>

## Start with these four checks


1. **Update nightly.** Upgrade the failing worker, then retest one source.
2. **Check Deno.** Confirm the runtime appears in the verbose log.
3. **Try a valid session.** Browser cookies can help with a small download job.
4. **Test another exit IP.** If the same public source works there, move jobs off the flagged route.

> **A flagged IP can stay rejected for days**
> FlashData has observed this in bulk downloads. If a controlled test works on another exit, take the failing route out of service; a short cooldown may not clear it.

- [HTTP 429 cooldown and pacing](https://flashdata.dev/docs/guides/yt-dlp-429-too-many-requests/reference.md)
- [HTTP 403 recovery](https://flashdata.dev/docs/guides/yt-dlp-403-forbidden/reference.md)

<a id="symptoms"></a>

## 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. |

<a id="baseline"></a>

## 1. Update and test one source


**Refresh the baseline before testing access**

```bash
python -m pip install -U --pre "yt-dlp[default,curl-cffi]"
python -m yt_dlp --version
deno --version
```

Use 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.

**A. Clean anonymous extraction**

```bash
python -m yt_dlp --ignore-config --js-runtimes deno --impersonate="" --verbose --no-playlist \
  --simulate "https://www.youtube.com/watch?v=jNQXAC9IVRw"
```

Replace the example with your failing watch URL. --ignore-config removes implicit cookie/client settings; it does not remove environment proxies or installed plugins.

**B. The Firefox profile that can play the video**

```bash
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"
```

Sign into the intended account in Firefox and confirm the exact video plays there first. This reads that browser session; it does not use a session from Chrome.

| 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.

- [Update the actual worker installation](https://flashdata.dev/docs/guides/yt-dlp-403-forbidden/reference.md#versions)
- [Repair runtime / EJS warnings](https://flashdata.dev/docs/guides/yt-dlp-403-forbidden/reference.md#challenges)

<a id="network"></a>

## 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.

**Try one replacement sticky proxy route**

```bash
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"
```

Use a session that keeps one outbound IP for the entire job. Add --cookies only if the access comparison showed they were needed.

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.

**Compare IPv4 on a direct worker route**

```bash
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"
```

When a proxy is configured, -4 may only affect the connection to the proxy. Check the actual outbound route.

- [Full direct/proxy IP comparison](https://flashdata.dev/docs/guides/yt-dlp-403-forbidden/reference.md#environment)

<a id="cookies"></a>

## 3. Use cookies for a small job


A browser's display name is not its profile-directory name. In Chrome, read Profile Path at `chrome://version`. In Firefox, use `about:profiles` to identify the profile that actually has the working YouTube session. A background service running as a different OS user will not automatically inherit it.

**Firefox**

Use this when the default profile can play the video. If several profiles exist, pass the intended profile's name or path using Firefox's supported browser/profile syntax.


**Default Firefox profile**

```bash
python -m yt_dlp --ignore-config --js-runtimes deno --impersonate="" --verbose --no-playlist \
  --cookies-from-browser firefox -f ba -o "diagnostics/%(id)s-%(epoch)s.%(ext)s" \
  "https://www.youtube.com/watch?v=jNQXAC9IVRw"
```


**Chrome profile**

Replace Profile 1 with the actual directory name. On Windows, use the cookie-error section below if Chrome's database cannot be copied or decrypted.


**Select a specific Chrome directory**

```bash
python -m yt_dlp --ignore-config --js-runtimes deno --impersonate="" --verbose --no-playlist \
  --cookies-from-browser "chrome:Profile 1" -f ba -o "diagnostics/%(id)s-%(epoch)s.%(ext)s" \
  "https://www.youtube.com/watch?v=jNQXAC9IVRw"
```


**Exported file**

Use a Netscape-format file, not JSON or a copied Cookie header. The file must be readable and writable by this local job because yt-dlp saves its cookie jar on close. For a read-only container secret, use a per-job copy as shown below.


**Read a private cookie file**

```bash
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"
```


> **Loading is not acceptance**
> An 'Extracted cookies' count or 'Found YouTube account cookies' line proves that local data was found. It does not prove that YouTube still accepts the session. Read the following player response and any invalid-cookie warning.

The cookie file authenticates a browser session. Keep it out of Git, support attachments and public logs. Test the account's real access in the browser; cookie export cannot add access to a private, removed or membership-restricted video.

- [Browser/profile syntax and cookie format](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp)

<a id="renew-session"></a>

## 4. Renew an expired session


**Markers for this branch**

```text
The provided YouTube account cookies are no longer valid
playability status: LOGIN_REQUIRED
```

Shortened markers seen together in upstream issue #15527. The first line alone is not evidence of a valid session.

For 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:

1. Open a new private/incognito window and sign into the account that can access the source.
2. In that same tab, open https://www.youtube.com/robots.txt. Keep it as the only tab in the private session.
3. 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.
4. Close the entire private window after exporting. Do not keep using that exported session in the browser.
5. 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.

**Retest the replacement, without replaying the batch**

```bash
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.

- [Exact YouTube export procedure](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies)
- [Invalid-session example: #15527](https://github.com/yt-dlp/yt-dlp/issues/15527)
- [Cookie rotation explanation: #14872](https://github.com/yt-dlp/yt-dlp/issues/14872)

<a id="server"></a>

## 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.

**Copy the session before giving it to yt-dlp**

```python
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"])
```

Keep the downloader context inside the temporary-directory context so the cookie file still exists when yt-dlp saves it. This protects the supplied file; it does not renew an expired session.

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.

- [Cookie persistence in YoutubeDL](https://github.com/yt-dlp/yt-dlp/blob/2026.10.26/yt_dlp/YoutubeDL.py)

<a id="tokens"></a>

## 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.

- [Install and verify both provider components](https://flashdata.dev/docs/guides/yt-dlp-403-forbidden/reference.md#po-token)
- [Provider's sign-in incident: #37](https://github.com/Brainicism/bgutil-ytdlp-pot-provider/issues/37)

<a id="workload"></a>

## 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.

**Resume using the working configuration and sleep preset**

```bash
python -m yt_dlp --ignore-config --config-locations yt-dlp-work.conf -t sleep --retries 3 \
  --fragment-retries 3 --batch-file urls.txt
```

Keep the same archive and output policy. The configuration must contain your working runtime and any required session/provider settings.

| 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.

- [Dedicated 429 recovery and request pacing](https://flashdata.dev/docs/guides/yt-dlp-429-too-many-requests/reference.md)
- [YouTube request-rate error and pacing](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#this-content-isnt-available-try-again-later)

<a id="cookie-errors"></a>

## Windows: cookie copying and decryption errors


| Failure | Concrete action | What to check next |
| --- | --- | --- |
| `Could not copy Chrome cookie database` / `Permission denied` | Close all Chrome windows and its remaining background processes, then rerun as the same OS user. Confirm Profile Path rather than guessing it. | The log should advance past database copying. If the next error is decryption, use the next row. |
| `Failed to decrypt with DPAPI` | Use a Firefox profile with the intended login, or export YouTube cookies to Netscape format and pass --cookies. Windows Chrome encryption is a known upstream issue. | Successful cookie loading followed by a player response. Running as administrator or changing video formats does not decrypt the session. |
| `Cookies file must be Netscape formatted, not JSON` | Re-export as cookies.txt/Netscape format. A browser JSON export or a raw Cookie request header is not that format. | The file parser accepts the export; then test whether YouTube accepts the session. |
| `No such file or directory` | Check the path under the actual service user. The worker container cannot read a profile that exists only on your laptop. | The expected file is present at the path in the command, without printing its contents. |

These failures happen before the intended authenticated request. Replacing your outbound IP cannot make an unreadable database readable. Conversely, once cookies load correctly, a continuing bot-check response needs a session or network test rather than another database-copy workaround.

- [Chrome database locks: #7271](https://github.com/yt-dlp/yt-dlp/issues/7271)
- [Chrome Windows decryption: #10927](https://github.com/yt-dlp/yt-dlp/issues/10927)

<a id="recovery"></a>

## 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.

- [403 fixes with provider commands](https://flashdata.dev/docs/guides/yt-dlp-403-forbidden/reference.md)
- [Resumable Python worker](https://flashdata.dev/docs/guides/yt-dlp-python-api/reference.md)
- [Managed YouTube downloads](https://flashdata.dev/products/youtube-download)
