mirror of
https://github.com/imputnet/cobalt.git
synced 2026-05-23 06:41:22 -05:00
[GH-ISSUE #942] YouTube OAuth2 tokens no longer work #4968
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @coderonex on GitHub (Nov 25, 2024).
Original GitHub issue: https://github.com/imputnet/cobalt/issues/942
problem description
Newly registered youtube account, getting cookies that don't work?
your instance configuration
No response
@coderonex commented on GitHub (Nov 25, 2024):
@hazycora commented on GitHub (Nov 25, 2024):
I got this too on an account made a week ago, it used to work and then this started happening yesterday. Would love to provide logs but there's nothing in the server's console. Don't know if this is normal, but playing videos through the YouTube site doesn't have this problem on the account- maybe it's just unable to make YouTube TV sessions, or something.
Trying a much older (but still unused, not my main account don't worry!) account, this doesn't happen, so it seems maybe banned accounts get a different error response now?
@hextor1 commented on GitHub (Nov 26, 2024):
I have the same error on my new created accounts. basically I have 5 gmail acocunt on 50 youtube channel created on these gmails. from yesterday i am facing this error. even i did not face any error before like this
unexpected status: error (error.api.youtube.api_error)
@wukko commented on GitHub (Nov 26, 2024):
as far as i can tell, youtube is slowly rolling out a change that breaks oauth2 tokens for clients other than youtube tv (cobalt uses android & ios). not all accounts are affected yet, but an increasingly higher amount of them is. the main cobalt instance is also affected.
we don't know of a proper fix at the moment, but you can follow the same issue in youtube.js' repo: https://github.com/LuanRT/YouTube.js/issues/803 or read the history of the issue in yt-dlp's repo (they ended up removing oauth2 support): https://github.com/yt-dlp/yt-dlp/issues/11462
@Chidubemmo commented on GitHub (Nov 26, 2024):
Dude I just want to listen to Chromakopia in Bomb Rush Cyberfunk 😭 I hate YouTube so much
@wukko commented on GitHub (Nov 27, 2024):
oauth2 tokens are completely cooked now, the change was fully rolled out. not sure what to do from now on aside from adding support for web cookies, but those are very short lasting :(
@hextor1 commented on GitHub (Nov 27, 2024):
@wukko You mean cookies will not work in future? :(
from my side proxies is also not worked when I try to download the songs with proxy donwlaod 0 byte file
@MC-shark commented on GitHub (Nov 28, 2024):
same here
@asepsunarya commented on GitHub (Nov 29, 2024):
same here
@coderonex commented on GitHub (Dec 4, 2024):
Is there a new solution? @wukko
https://github.com/FoxxMD/multi-scrobbler/pull/236#issue-2715968493
@hextor1 commented on GitHub (Dec 4, 2024):
@lpwyz commented on GitHub (Dec 10, 2024):
@ZEREX222 commented on GitHub (Dec 21, 2024):
also have the same issue with a new account. do we still not have a solution?

@arman-async commented on GitHub (Dec 28, 2024):
I have the exact same problem. Did you manage to solve it?
Please guide me too.
@moeinrahimi1 commented on GitHub (Jan 3, 2025):
how is it that cobalt.tools can download youtube videos but not self hosted one?
@andreioprisan commented on GitHub (Jan 3, 2025):
I'm still running into this issue with a self-hosted instance. Has anyone been able to get this working?
@wukko commented on GitHub (Jan 3, 2025):
@moeinrahimi1 we don’t use accounts anymore, which is why it works fine
we already implemented support for web cookies, an alternative way of using accounts for “bad reputation” ips. will update the documentation very soon!
@georgeollis commented on GitHub (Jan 3, 2025):
Thank you @wukko. Look forward to the new documentation for using cookies instead of user accounts.
@coderonex commented on GitHub (Jan 12, 2025):
Can you update the docs first, really need your support!
@CoderHyve51 commented on GitHub (Jan 13, 2025):
I am encountering the same issue as well. I just created a new Google account today to fetch the YouTube OAuth cookies as instructed by the
pnpm run token:youtubecommand.Now, when I tried to make a YouTube request, it returns the same frustrating error everyone here faces.
{
"status": "error",
"error": {
"code": "error.api.youtube.api_error"
}
}
Is there any solution out there to this problem?
@georgeollis commented on GitHub (Jan 17, 2025):
Does anyone know what the new configuration for YouTube should be? I've got a private instance running and would like to get YouTube up and running again. Thanks!
@CoderickLamar commented on GitHub (Jan 23, 2025):
What are you using instead of accounts?
@pseudoseed commented on GitHub (Jan 28, 2025):
Seems like everyone is impacted by this change. Safe to say oauth will no longer work for this?
@DanteMS commented on GitHub (Feb 2, 2025):
Just remove any YouTube cookies. It works without them, unless your IP is blocked.
@sertraline commented on GitHub (Feb 12, 2025):
You can put youtube cookies directly in your cookies.json and it will work. No need for auth token.
@sertraline commented on GitHub (Feb 12, 2025):
I was tired of editing cookies manually so I've made a fork of a Chrome extension. This extension works locally. It will export (or copy) domain cookies in a format
cookie=value;another_cookie=value;that Cobalt can read, so you can quickly copy and paste it into yourcookies.jsonfile.On my instance I have:
And "youtube-cookies" are copied cookies from my public Youtube account that I've made specifically for Youtube downloads.
@hextor1 commented on GitHub (Feb 13, 2025):
Please can you tell me how to find cookies from personal youtube account and also let me know did you give the cookies path in docker compose file???
@lancer1256 commented on GitHub (Feb 21, 2025):
@wukko How do you keep it working so consistently at the scale you serve on the main cobalt site without getting flagged w/bot protection? (saw you mentioned 150k daily visitors in discord!) it is super impressive
are you guys using cookies on the main cobalt site and/or distributing requests from a ton of different ip addresses to keep volume per ip low?
@shengchenyang commented on GitHub (Feb 22, 2025):
I ran it successfully.I can get the resolved url, but I still get a 0 bytes file when I download it using an ip with bad reputation.
It seems that the cookie does not take effect when downloading?Have you tested this situation?
@Shabinder commented on GitHub (Feb 22, 2025):
+1 curious to know.
@wwwmaster1 commented on GitHub (Feb 26, 2025):
Probably by not disclosing how it's done.