-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default API key is disabled #308
Comments
This would also be a good time to get in touch with distribution package maintainers. Distributions that have a nonprofit API account with Google may be able to include distribution-specific keys with their packaged versions. I'm the Arch maintainer, and we're not yet set up for that, but I believe someone's working on it for unrelated reasons. |
If a distribution wants to package Then, if an user chooses to use their own API key, they can specify it in Edit 1: as an alternative to using an YouTube API key, I created a fork of Edit 2: another alternative is pipe-viewer, which parses the YouTube website directly in a similar way like NewPipe does. |
… file exists) (#308) Personal credentials can be specified in `~/.config/youtube-viewer/api.json`.
How should that .json file look? I have one from kodi's youtube addon named api_keys.json. It looks like this and it contains the api keys I had made for myself a few days ago when google started all that bs
Will youtube-viewer work if I just copy it over to the forementioned folder and rename it? ---edit |
The format of {
"key": "API_KEY",
"client_id": "CLIENT_ID",
"client_secret": "CLIENT_SECRET"
} |
Still no go. This is how it looks now
And the error remains the same. I have to leave for work now, I will look it up when I get home. |
it needs 5/10 mins to propogate to the gogle servers |
If you're logged in using the previous credentials, try |
doesn't youtube-viewer already have invidious support, with the "--invidious!" command? Also the title itself is misleading: unless Google restricts people making API keys, we can just create our own API key for youtube-viewer/mpsyt and use that. |
Do I also need to tell youtube-viewer about my youtube account, or is creating the api.json file sufficient? |
Not really. The API of invidio.us is used only in extracting the streaming URLs for some videos.
Specifying the API key in |
EDIT: This is my fault. I was signed and forgot, but once I signed out I fixed the problem. In light of having to use personal API key, I changed my API to the one I use for mpsyt, and for mpsyt it works. However, for youtube-viewer, it doesn't. I use the same key for mpsyt, I remove the client_id and client_secret thinking maybe they caused it, they didn't change anything. I made my own client_id and client_secret and put it in, and it didn't work. The error message I'm getting is
I copied the url it mention [the (KEY) part was my API key] and it works. I tried looking into Utils.pm, and at line 224, it's this code
I removed the and statment, but it didn't do anything, only removed the "Use of uninitialized value in numeric gt" error message I am using YouTube Viewer 3.7.4 on Arch Linux, using the latest youtube-viewer package. |
I logged in on my pc via ssh and tried it again 1+ hour after making the post above, but the error was the same.
I do not use credentials on any app that plays content from youtube. I tried it though, but the result was the same. Just to be sure, the api.json function is availabe to youtube viewer 3.7.4 only, right? Because that is what I have. If not, I will have to clone the git repo and try the git version, obviously because it is newer. ---edit
Are yours similar? |
Yes. That is correct.
|
Check!
Do I also need the ".apps.googleusercontent.com" part? The kodi addon automatically chops it off, so it was not in the file when it was copied.
Check! Thank you :) |
Try:
It should print an URL with the API key included. Check to see if it actually uses the correct key. Optionally, copy-paste the URL into a browser to see if if that works and if there are any error messages. |
I am an idiot :( |
so paste some keys... |
Not sure whether that's gonna help. I used yt-viewer w/ a very old gentoo key which worked for about a day (and maybe half a dozen searches), but 403's since yesterday evening CET. The little paranoid guy in the back of my head thinks they're shutting down API access to enforce using the browser which is, given of the awesome HW acceleration support in linux browsers, nice /sarcasm yt-dl still works, so you can play a URL w/ eg. mpv. |
Update: the key works again. |
@clort81 @luebking |
Chromium PKGBUILD and the gentoo key was in some post, 5 years ago or so. |
Can't make it work because youtube-viewer keeps using the default API key. I have generated API keys and put them to
Here is the debug output:
Notice it keeps using |
Make sure to have the latest version of youtube-viewer installed (3.7.4). |
I have my Youtube Data API key specified in When I copy that URL into Firefox, I get The API is enabled and has been for a few months. Afaik it worked with mps-youtube or a similar youtube program when I made the key. |
Try to create a new project with a new API key. Apparently, Google automatically disables the API keys that have not been used for 90 consecutive days. |
So all that means, if i want to use it i will be tracked by google again ? |
@asteriosos: Sadly, yes. As an alternative, I created straw-viewer, which uses the API of invidio.us, and thus it does not require an YouTube API key. |
I have the following issue with my keys and I would like to ask if anyone else has it too. I have made my personal keys and I use them on youtube-viewer and on kodi's youtube addon. That is... 4 devices in total, youtube-viewer on my pc and the kodi addon on the pc, an old laptop and an rpi3b+. In general, I have zero issues during the day and every search works as it should with no 403 errors. Does it only happen to me, or is the new api somewhat garbage? I have checked the "stats" table on my google account and the bars are merely visible. Irrelevant to the above, but I have access to a google account that can not be deleted (info upon request). Do you want me to use it and make a set of keys for youtube-viewer? |
It may be promised the "Incognito" mode feature implementation. Of course, it's a piece of work, you can't use API tokens and needs reverse engineering of browser flow. But it'll be player with keeping privacy. |
One more thing that proves, at least for me, that the new api is garbage. And from all 12 songs, only 5, 6, 7 and 10 played and all the others were just skipped with a 403 error. Everything starts as it should, with the descrtiption at the top
then the actual url of the video and its info
And yet nothing plays! Doing the same with the --debug option gives similar results It plays a different set of videos but it pops the usual 403 error on the ones that do not play, so I now definitely know the reason why they do not play. What is even worse is that if I try to open a video on mpv, which simply uses youtube-dl to parse the urls and play them, the 403 error comes up again! I do have my own api keys, but how the f am supposed to make mpv use them? Youtube-viewer 3.7.5, mpv 0.32, youtube-dl 2020.03.24. Every video that got skipped with the 403 error plays at it should in the web browser. |
Whats about https://github.com/TeamNewPipe/NewPipe the use a way to analyze the website so they don't need a google account.... maybe this way can be ported here also ? |
Can I somehow disable the video description from being printed in the terminal? It will help me a lot with debugging what plays and why. In other news, one more proof that the new api is garbage. When you search something in kodi, the results are listed as
When all the api requests are used, the user gets a notification and the addon returns to search. Yesterday, and for the very first time ever in the 6+ years that I use it, the addon returned a blank page! Even the 3 main categories at the top were missing! |
Another first today, for youtube-viewer this time. ---edit
|
I made a big discovery about my "all playlist entries go to 403" issue! Other than that, I tried debian's keys I mention above and they do not seem to work. Comparing them to my keys, the api key and the client secret seem to have a proper "size", (39 and 24 characters respectively), but the client id is much smaller (45 vs 12 characters). Why? |
Ok so guys i just dowloaded the program and it doesn't work. |
Do you mean these? |
Maintainer-needed as I'm giving up the package due to trizen/youtube-viewer#308 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Zoltan Puskas <zoltan@sinustrom.info>
Maintainer-needed as I'm giving up the package due to trizen/youtube-viewer#308 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Zoltan Puskas <zoltan@sinustrom.info> Closes: #16027 Signed-off-by: Aaron Bauman <bman@gentoo.org>
The new api is garbage, episode 10.
Does it mean I have to make new keys now? |
I am done with this garbage api, final episode. @trizen |
Freetube seems to be a wrapper for the youtube web page. It is an electron based app after all. That means it works in a completely different way compared to youtube-viewer or kodi's addon, which access youtube's api directly, so no wonder it always works. So, as far as I am concerned, sorry but I will pass. |
@asteriosos Something similar to NewPipe's approach for parsing the YouTube website directly: https://github.com/trizen/pipe-viewer |
the instructions here on this github to set up an API Key seem to no longer to match up with the menus of google's cloud console. |
I recently got the following message from the YouTube API Services team:
They reduced the quota limit from 25M to 12.5M queries per day:
Everyone is requested to create their own API key and client ID/SECRET values, otherwise
youtube-viewer
will no longer work.Check the instructions in README.md for how to create your own API key.
Edit: the default API key of
youtube-viewer
is now disabled.The text was updated successfully, but these errors were encountered: