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 - RajneeshMalik - 2020-02-16

(2017-12-21, 23:27)jmh2002 Wrote: YOUTUBE PERSONAL API KEY INSTRUCTIONS by jmh2002

* Information collated from previous posts in both the old and the new YouTube threads. 
* Thank you to everyone who contributed (credits to WHCTHBD, jdf76, activoice, anxdpanic and many others)

NB: These instructions are meant for existing users with a working, signed in, and activated YouTube addon.
They are not meant to help you install, setup, sign in, or activate the YouTube addon itself if you are a first time user.

Please install, setup, sign in, activate and test the YouTube addon first, before creating your own Personal API Keys.

* Step 1:

- Click HERE - https://console.cloud.google.com/ 
- Select your email preference (Yes or No - it does not matter)
- Select Yes to agree to the Terms of Service (for reference: https://console.cloud.google.com/terms)
- Click Agree and Continue

NB: Please ignore any offers to "Sign up for a free trial..." and/or "Try Google Cloud Platform for free". It is not required. 

- Select Project > Create Project > Enter Project Name (the name does not matter) > Create
- WAIT until the next page loads with the the New Project that you just created.

ImageImageImage* Step 2:

- Click HERE - https://console.developers.google.com/apis/library
- Go to YouTube APIs > Select YouTube Data API > Enable

ImageImage* Step 3:

- Click HERE - https://console.cloud.google.com/apis/credentials
- Select Create Credentials > API Key
- Copy and Save the API key. You will need this later. DO NOT POST THIS PUBLICALLY.
- Click Close

ImageImage* Step 4:

- On the same page, Select Create Credentials > OAuth Client ID
- Then Select > Configure Consent Screen

ImageImage* Step 5:

- Enter a Name in "Product name shown to users" (the name does not matter)
- Click Save and WAIT for the next page to load with the OAuth Client ID screen
- Then Select Other > Create
- Copy and Save the Client ID and the Client Secret. You will need these later. DO NOT POST THESE PUBLICALLY.
- Click OK.

ImageImage* Step 6:

- Go to the YouTube addon > Settings > API Settings > Click Enable Personal API Keys > Enter all 3 Keys > Click OK
- Then > Sign Out > and after Sign In again (with the normal 2 x web activation)

After a successful Sign In to the YouTube addon you should now be using the Personal API Keys that you created.

Image* OR

- With Kodi shut down, Paste all 3 Keys into: Kodi / userdata / addon_data / plugin.video.youtube / settings.xml 
in the following lines of code:

<setting id="youtube.api.enable" value="true" />
<setting id="youtube.api.id" value="Client ID" />
<setting id="youtube.api.key" value="API Key" />
<setting id="youtube.api.secret" value="Client Secret" />

- Then > Start Kodi > Open the YouTube addon > Sign Out > and after Sign In again (with the normal 2 x web activation)

After a successful Sign In to the YouTube addon you should now be using the Personal API Keys that you created.


Enjoy, jmh2002


PLEASE SEE THE FAQ BELOW FOR THE FOLLOWING:* HOW TO TEST IF YOUR PERSONAL API KEYS ARE WORKING* HOW TO VIEW YOUR PERSONAL API QUOTA DAILY USAGE HISTORY


Thanks a lot jmh2002.

This step by step of a perfect tutorial helped me with signing issues in 2020 as well on Kodi Leia.

Regards

Malik

PS: Couldn't find "Thumbs up" button so had to quote.


RE: YouTube Plug-in Thread - RajneeshMalik - 2020-02-16

(2020-02-08, 18:30)Wojtek Wrote:
(2020-02-08, 18:19)anxdpanic Wrote: Still an issue with the same file, so I'd try shutting down Kodi and manually deleting
Code:
~/.kodi/userdata/addon_data/plugin.video.youtube/access_manager.json

OK. On the plus side the plugin now launches and allows me to sign in. However, after I put the second code on google.com/device I was greeted with:
Image 

@Wojtek 

Same with me till I came across this.  Until then I was also getting the same screenshot with no advance option.

YOUTUBE PERSONAL API KEY INSTRUCTIONS by jmh2002:

https://forum.kodi.tv/showthread.php?pid=2681560#pid2681560


Malik


RE: YouTube Plug-in Thread - r0ck0 - 2020-02-16

(2020-02-15, 18:25)r0ck0 Wrote: I've been having an issue with youtube videos pausing and the screen flashing black during the first few seconds of playing. I can't seem to figure out whats causing the problem. It seems like a refresh rate switch but it didn't always do this.

So it is an issue with the refresh/frame rate switch. Some youtube videos start at 23.976 and then switch to 24fps. It only happens with videos that are 23.976 and not other frame rates. I'm using an nvidia shield with the latest nightly of leia. If I change the youtube MPEG-DASH to use Adaptive (MP4/H264) video quality then it plays fine but I do not get 4k video. If I set it to 2160p (4K) I get 4k but the pause and refresh rate switching. My TV supports all of the frame rates.


RE: YouTube Plug-in Thread - salfter - 2020-02-17

(2020-02-08, 18:30)Wojtek Wrote: OK. On the plus side the plugin now launches and allows me to sign in. However, after I put the second code on google.com/device I was greeted with:
Image 
Same here.  A LibreELEC installation that was previously working ate itself, so I did a clean install.  I put my YouTube API keys back in through the provided web interface and got through the first part of signing in OK.


RE: YouTube Plug-in Thread - jdf76 - 2020-02-17

Hello. I got a notification from Google that my keys were no longer valid hence why you are getting the "temporarily disabled" message. At this point your best bet is to create your own key till a new solution can be determined. 

My apologies for the inconvenience.

Jeff


RE: YouTube Plug-in Thread - powermarcel10 - 2020-02-17

(2020-02-17, 19:35)jdf76 Wrote: Hello. I got a notification from Google that my keys were no longer valid hence why you are getting the "temporarily disabled" message. At this point your best bet is to create your own key till a new solution can be determined. 

My apologies for the inconvenience.

Jeff

Hi! I followed the setps from post 2026 but im still not able to login with my existing api key. Do I need to create a new one and try again?

Cheers,
Marcel

EDIT: I created a new api and its working now!


New issue started today - pjrettin - 2020-02-17

When I try to go to the Youtube plugin, instead of going to the plugin it takes me to the Configure Youtube section, and at the top of the screen I see errors like:

401 Deleted Client....... oauth... etc, etc...

If I try to exit out, it just takes me back and I have to restart kodi.


RE: YouTube Plug-in Thread - rykios - 2020-02-17

From the kodi logs:

ERROR: [plugin.video.youtube] Error reason: |accessNotConfigured| with message: |Project 294899064488 has been scheduled for deletion and cannot be used for API calls.
Visit https://console.developers.google.com/iam-admin/projects?pendingDeletion=true to undelete the project.|

Looks like addon problem with google. The author hopefully can take care of it


RE: YouTube Plug-in Thread - poppascoop - 2020-02-17

So went through and tried the instructions that were just posted about getting personal API key.But after doing everything I am still getting this error message:

"OAuth Client was deleted"


RE: YouTube Plug-in Thread - desepticon - 2020-02-17

I've created an API and OAuth client id but now I get the error message

[plugin.video.youtube:
Requesting access token: |{"error_description": "Precondition Failed", "error": "authorization_pending"}|]

in the logs when I try to login. App now works others though. Anyone have any tips? Do I have to wait for google to authorize my api or something?


RE: YouTube Plug-in Thread - peterpeterpeter - 2020-02-17

Me too.

login exception deleted client 401

on Win 10 Kodi 18.5


RE: YouTube Plug-in Thread - sirbadger - 2020-02-17

Can anyone advise me as to what I'm doing wrong..?

I've enabled personal API keys, entered the details and I can now watch YouTube vids again (winning!) but when I try to sign in its still trying to use "YouTube on TV", not the application/oauth I setup.


RE: YouTube Plug-in Thread - Evil_Genius_Prog - 2020-02-17

Videos don't plays anymore for me (about 6-8 hours ago it worked fine).
Now i receive this error:
Exception: Error reason: |accessNotConfigured| with message: |Access Not Configured. YouTube Data API has not been used in project 104934473204 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=104934473204 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
I use my private API key. Same situation with signing in, and without it. This happens when I send direct link to Kodi (by using firefox addon, or Yatse), and when I tries to open youtube addon menu.

Kodi version: 18.2-1
Installed on Raspberry Pi 3B+


RE: YouTube Plug-in Thread - jdf76 - 2020-02-17

(2020-02-17, 22:14)Evil_Genius_Prog Wrote: Videos don't plays anymore for me (about 6-8 hours ago it worked fine).
Now i receive this error:
Exception: Error reason: |accessNotConfigured| with message: |Access Not Configured. YouTube Data API has not been used in project 104934473204 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=104934473204 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
I use my private API key. Same situation with signing in, and without it. This happens when I send direct link to Kodi (by using firefox addon, or Yatse), and when I tries to open youtube addon menu.

Kodi version: 18.2-1
Installed on Raspberry Pi 3B+

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 :
A fully functional demo account, including a username and password with which we may access your API Client. The demo account you provide will be used only for compliance inspection and the credentials will not be shared.
A fully completed YouTube API Audit Form
Screenshots of how your API Client and its users access and use the YouTube API Services
Documents relating to your implementation, access and use of YouTube API Services
 
For reference, your  project numbers are:
761252151047
639620369361
430572714882
294899064488
 
Please ensure that all required supporting materials are submitted and sufficient, and all questions are answered thoroughly. If this is not the correct or preferred API contact email, or if you would like us to cc any other contacts on future emails, please let us know. 
 
Thanks,
YouTube API Services team
----
YouTube, LLC 901 Cherry Ave, San Bruno, CA 94066
 
You have received this mandatory email service announcement to update you about important changes to YouTube products or your account.

So I had to delete the keys.

Jeff


RE: YouTube Plug-in Thread - jdig4240 - 2020-02-17

(2020-02-17, 23:13)jdf76 Wrote:
(2020-02-17, 22:14)Evil_Genius_Prog Wrote:  

So I had to delete the keys.

Jeff 

Does Youtube frown upon the development of the Kodi Youtube addon? I wonder why theres not an official Kodi addon from Youtube?