Kodi Community Forum
YouTube Plug-in Thread - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: YouTube Plug-in Thread (/showthread.php?tid=353278)



RE: YouTube Plug-in Thread - speedwell68 - 2020-02-19

(2020-02-19, 09:44)callumgw Wrote: I had given up on using api keys, and was managing with the search function. But today it started throwing an error suggesting this app will be deleted.
I have the deepest of respect for the developers and i am greatful for their work. I know that changes made by Google is causing the dificulties. However, the continual occurence of errors is getting quite frustrating and means this addon is not suitable for inexperienced users.

I ask that we consider trying to get this addon approved by google.

Thx
C

Google are never going to do that.


RE: YouTube Plug-in Thread - Haris1977 - 2020-02-19

Hi!

Can i use the same set of api's/id/secret for 2 different devices? Or do i need to re create keys?

Cause if i go to sign in page (https://console.developers.google.com/) to create new keys i only get a traffic / errors / median latency screen


RE: YouTube Plug-in Thread - speedwell68 - 2020-02-19

(2020-02-19, 10:37)Haris1977 Wrote: Hi!

Can i use the same set of api's/id/secret for 2 different devices? Or do i need to re create keys?

Cause if i go to sign in page (https://console.developers.google.com/) to create new keys i only get a traffic / errors / median latency screen

I used mine on 3 devices and all is good.


RE: YouTube Plug-in Thread - Haris1977 - 2020-02-19

(2020-02-19, 11:33)speedwell68 Wrote:
(2020-02-19, 10:37)Haris1977 Wrote: Hi!

Can i use the same set of api's/id/secret for 2 different devices? Or do i need to re create keys?

Cause if i go to sign in page (https://console.developers.google.com/) to create new keys i only get a traffic / errors / median latency screen

I used mine on 3 devices and all is good. 
Yeap seems that works for (at least) 2 of my devices.

Question: How long will it last? I mean is there any fear that the plugin will some day stop working again?


RE: YouTube Plug-in Thread - TP.One - 2020-02-19

(2020-02-17, 23:13)jdf76 Wrote: Just an FYI all the old default API keys are deleted. You need to create your own keys to get it to work

I got this letter from Google last week. 
Quote:Dear YouTube API Developer,
We are currently conducting a mandatory compliance review of your YouTube Data API Project. The review is to assess your compliance to our YouTube API Services Developer Policies (link) and to learn about how our service is being used.
At your convenience in the next seven (7) business days, please complete and submit the following information :
Quote:Dear YouTube API Developer,
We are currently conducting a mandatory compliance review of your YouTube Data API Project. The review is to assess your compliance to our YouTube API Services Developer Policies (link) and to learn about how our service is being used.
At your convenience in the next seven (7) business days, please complete and submit the following information :

seven (7) Days?? R them cracy?

(guess thats why them changed there Motto "dont be evil" to something else, lol.)

on the other Hand didnt them read all Mails, and claimed they dont, while there still had there Motto "dont be evil"? (So guess one dont have to give to much to there Motto.)


RE: YouTube Plug-in Thread - the_other_guy - 2020-02-19

Success! Device connected then is starts all over again


RE: YouTube Plug-in Thread - curael - 2020-02-19

What a hassle. But it works. 😅


RE: YouTube Plug-in Thread - HYPERIONzoom - 2020-02-19

Adding API keys is not working for me. All I get is "LOGINEXCEPTION:[401] UNATHORIZED_CLIENT". These are new keys (I didn't have a use for them before). I've turned off "use developer keys". I've used copy and paste to make triple sure that I copied the correct credentials in for API key, AIP ID and API Secret. I've tried uninstalling (though Kodi doesn't allow me to uninstall the YouTube addon due to a dependency). I've tried clearing and deleting all the settings etc and running the setup wizard.

It's just not working for me.

Here's to hoping an update can fix this problem for all of us.


RE: YouTube Plug-in Thread - mrpg - 2020-02-19

(2020-02-18, 15:20)mrpg Wrote: Hi,

I have created  a personal api key according to this : 
https://github.com/jdf76/plugin.video.youtube/wiki/Personal-API-Keys

and enetered the keys into the .json file and rebooted.

However, i have tried signing in with my account 5 times now, and it still wont sign in, what am i missing?

BR
PG
I still have this issue , youtube asking me to go to http://www.google.com/device , and it never logs on.


RE: YouTube Plug-in Thread - curael - 2020-02-19

(2020-02-19, 12:39)HYPERIONzoom Wrote: Adding API keys is not working for me. All I get is "LOGINEXCEPTION:[401] UNATHORIZED_CLIENT". These are new keys (I didn't have a use for them before). I've turned off "use developer keys". I've used copy and paste to make triple sure that I copied the correct credentials in for API key, AIP ID and API Secret. I've tried uninstalling (though Kodi doesn't allow me to uninstall the YouTube addon due to a dependency). I've tried clearing and deleting all the settings etc and running the setup wizard.

It's just not working for me.

Here's to hoping an update can fix this problem for all of us.

Did you do "remove user" after you added the API key? I had to reregister the app from scratch after the keys were inserted. And then it worked. You could also try deleting the addon from your OS instead of inside Kodi. Since you can't remove it. But for me, I didn't have to remove anything. Just remove the "default" user in the addon settings and then do the two auth requests again on google.com/device or what ever. The name of the API access should then show up during registration.


RE: YouTube Plug-in Thread - HYPERIONzoom - 2020-02-19

(2020-02-19, 13:05)curael Wrote: Did you do "remove user" after you added the API key? I had to reregister the app from scratch after the keys were inserted. And then it worked. You could also try deleting the addon from your OS instead of inside Kodi. Since you can't remove it. But for me, I didn't have to remove anything. Just remove the "default" user in the addon settings and then do the two auth requests again on google.com/device or what ever. The name of the API access should then show up during registration. 

YES!! Thank you, that worked! I deleted the "default" user and that did the trick for me.

Thanks so much!


RE: YouTube Plug-in Thread - RJ45 - 2020-02-19

Tinfoil hat here. So with the solutions posted on the last few pages, did Google enforce a change to their API that makes it impossible to access it without providing identifying credentials like a key you created in a project? Do they really hate guest users they cannot identify that much? Is it still somehow possible to access YouTube with this addon without providing something that is tied to a project which can be used to connect to you?

Is public exchange/posting of keys an option?


RE: YouTube Plug-in Thread - curael - 2020-02-19

(2020-02-19, 13:18)HYPERIONzoom Wrote:
(2020-02-19, 13:05)curael Wrote: Did you do "remove user" after you added the API key? I had to reregister the app from scratch after the keys were inserted. And then it worked. You could also try deleting the addon from your OS instead of inside Kodi. Since you can't remove it. But for me, I didn't have to remove anything. Just remove the "default" user in the addon settings and then do the two auth requests again on google.com/device or what ever. The name of the API access should then show up during registration. 

YES!! Thank you, that worked! I deleted the "default" user and that did the trick for me.

Thanks so much!

Heeey, that's great news! Big Grin


RE: YouTube Plug-in Thread - sanjonny - 2020-02-19

(2020-02-19, 13:05)curael Wrote:
(2020-02-19, 12:39)HYPERIONzoom Wrote: Adding API keys is not working for me. All I get is "LOGINEXCEPTION:[401] UNATHORIZED_CLIENT". These are new keys (I didn't have a use for them before). I've turned off "use developer keys". I've used copy and paste to make triple sure that I copied the correct credentials in for API key, AIP ID and API Secret. I've tried uninstalling (though Kodi doesn't allow me to uninstall the YouTube addon due to a dependency). I've tried clearing and deleting all the settings etc and running the setup wizard.

It's just not working for me.

Here's to hoping an update can fix this problem for all of us.

Did you do "remove user" after you added the API key? I had to reregister the app from scratch after the keys were inserted. And then it worked. You could also try deleting the addon from your OS instead of inside Kodi. Since you can't remove it. But for me, I didn't have to remove anything. Just remove the "default" user in the addon settings and then do the two auth requests again on google.com/device or what ever. The name of the API access should then show up during registration.     
I would also add I ran into numerous problems getting it to work even though I had a valid oauth setup in the past. Three things I found. If you have not used your api id in awhile, it is deleted deactivated by google (found this on an authentication forum)

*****EDIT, Just start a new api.
 If you hand create the api key or the oauth key without doing it thru the enabling the youtube v3 and using the create credentials dialog, it will fail, (also from another forum) neiither of these are documented. So process should be
If you already have an old api id, just delete it, rekeying will not work if it has been more than 60 or 90 days
Follow the github guide https://github.com/jdf76/plugin.video.youtube/wiki/Personal-API-Keys, but basically
1 create the developer account
2. enable the youtube v3 api...YOU MUST USE THAT dialog to create the oauth credentials FIRST (on my screen, the create button was on the right after enabling the api), and the consent screen, give a name then CREATE the api key. Doing it in a different order or creating the oauth without doing it when you first enable the api will fail with the eventual error message of you have not enabled the api when you try in kodi....
3. First check the setting in app is set to personal and make sure allow developer keys is off. I found it easiest to copy the keys and secret via the web interface in the app Enable the api configuration page, to enable this go to the 
Settings - API
 and enable 
Enable API configuration page


You should then be able to update your keys by visiting 
http://<IP of Kodi device>:<port>/api
The port used is 
Settings - HTTP Server - Port
 which by default is 50152
XXXXXXXHUGE IMPORTANT WARNING......You must....
4. Go to maintenance setting and clear the access_manager.json file before you restart if you don't, it will not work. you can also delete that file by hand but heck, you are already in the user interface, its like 4 clicks.
If you don't delete it, it rewrites
XXXXXXEND HUGE IMPORTANT WARNING!
5. Restart kodi. Then do the login scripts. 
There is one part I am unsure of...somewhere in the oath setup about, you pick devices and access. EDIT not necessary ---I had to click to add zone access (otherwise its just email and profile). I do not know if that is required to run the app, but I enabled all the locked youtube. That means they will review it at some point, but you might not need to do that to get it to work. ENDedit. Just leave them at default, I think email and profile...

when you reboot kodi, you should get the 2 google auth screens when you try to sign in.

One final hint, if you are doing it on multiple devices, after the first is set, use file manager to copy apikeys.json (or whatever it is called) to a network location so you can just add that to the next kodi box. I believe the file is in profiles/add_ondata/plugin.youtube.whatever. That saved time doing my 4 boxes as you just copy that file to the new device using filemanager, then start at step 4 above, saves you all the cut and pastes, restart and do logins.
If I think of anything else I will add it, but once I figured it out, got all 4 boxes up in about 7 or 8 minutes. On my devices where I just copied the files, I did not change user status at all, becuase wiping accessmanager I think does that anyway. I will try it out more later but hopefully that solves your problems.


RE: YouTube Plug-in Thread - curael - 2020-02-19

(2020-02-19, 14:06)sanjonny Wrote:
(2020-02-19, 13:05)curael Wrote:
(2020-02-19, 12:39)HYPERIONzoom Wrote: Adding API keys is not working for me. All I get is "LOGINEXCEPTION:[401] UNATHORIZED_CLIENT". These are new keys (I didn't have a use for them before). I've turned off "use developer keys". I've used copy and paste to make triple sure that I copied the correct credentials in for API key, AIP ID and API Secret. I've tried uninstalling (though Kodi doesn't allow me to uninstall the YouTube addon due to a dependency). I've tried clearing and deleting all the settings etc and running the setup wizard.

It's just not working for me.

Here's to hoping an update can fix this problem for all of us.

Did you do "remove user" after you added the API key? I had to reregister the app from scratch after the keys were inserted. And then it worked. You could also try deleting the addon from your OS instead of inside Kodi. Since you can't remove it. But for me, I didn't have to remove anything. Just remove the "default" user in the addon settings and then do the two auth requests again on google.com/device or what ever. The name of the API access should then show up during registration.     

There is one part I am unsure of...somewhere in the oath setup about, you pick devices and access. I had to click to add zone access (otherwise its just email and profile). I do not know if that is required to run the app, but I enabled all the locked youtube. That means they will review it at some point, but you might not need to do that to get it to work.
when you reboot, you should get the 2 google auth screens.

    
Yes, if you pick a "zone" you are applying restrictions, and that starts the verification process on the key. You do not need to add any zone for this to work. So it's not really a good idea to enable it in this case. It only complicates your process.
(2020-02-19, 13:36)RJ45 Wrote: Tinfoil hat here. So with the solutions posted on the last few pages, did Google enforce a change to their API that makes it impossible to access it without providing identifying credentials like a key you created in a project? Do they really hate guest users they cannot identify that much? Is it still somehow possible to access YouTube with this addon without providing something that is tied to a project which can be used to connect to you?

Is public exchange/posting of keys an option?
There seems to be only one option for you, and that is to create the API key for YouTube API v3 with only public data access and not personal user data. This way you put that key in and YouTube will start working without having to sign in. How ever, this will still require a Google account for creating the API access. So this is definitely not a good solution for public places or the likes. But yes, that way you can actually have the add-on work, wihtout it showing your subscriptions or anything and "Search" and "Popular right now" will work and you will have no need for signing in - or I should say, as opposed to the User data, you simply can't sign in - so the API key isn't as useful if someone were to get it. It doesn't grant access to your user data. The solution for the Google account could be creating an account specific for this and then just don't touch it after you generate the key. It's a hassle and I agree that it's rediculous of Google to do this. But oh well, what can ya do. Security is security and they are doubling down on it, it seems.