How to Use YouTube API Keys with the Kodi add-on? –

Kodi is a great tool on Raspberry Pi to watch videos from streaming services such as Amazon Prime, YouTube and many others.
However, on Kodi it is no longer possible to watch videos directly on YouTube, you have to create and use an API.
Because I understand that this can be difficult for many of you, I will explain everything in this tutorial so that you can easily install it on your Pi Framboise.

How do I create and use YouTube API keys on Kodi?
Once the YouTube add-on is installed, you will be prompted to configure the API keys.
These keys can be generated in the Google Developer Console after the creation of a specific application.

In theory, it doesn’t sound that complicated, but the interface isn’t intuitive at all if you’re not a developer (and even if you are).
I have some experience with the Google API, so I’m going to help you step by step, with images for each of them, so you can fill out this guide.

API key generation for the use of codi on purple Pi

The first step is access to Google’s development console.
Don’t worry, if it’s your first time, I’ll explain everything.

Create your project on the Google Development Console

  • Open the Developer Console website from your computer.
  • Sign in to your Google Account or create one if needed.
  • Accept the Terms of Service when you are here for the first time:
    .
  • Once you’re in the console, you can create a new project.
    Click on the link at the top of the screen:
    .
  • Fill in the form for the project name and press the CREATE button :

    You do not need an organization and can choose the desired name.

Within seconds the project dashboard appears and we can activate the YouTube API for this project.

Learn your raspberry ppi in 30 days
Beginner to Raspberry ppi
Learn useful Linux skills and practice different projects with step-by-step instructions.

Enable the YouTube API in yourproject.

The first step is done, copy this API key and paste it into a text document (or any other place where you want to save it), we will need it later.
Press Done to exit this screen.

Receive your YouTube keys

We’re almost done, but it’s not enough, the YouTube plugin needs 3 things and we only have the first
. Now we need to configure OAuth for the other two parts:

  • In the left menu, click on the OAuth Permission data screen:

    This is the screen that appears when you try to authorize a new request.e.g. for most chrome extensions).

  • In our case, everything is very simple, as this application is for private use only.
    Click External and create:
    .
  • On the next page, only fill in the required fields (application name, user support email and developer email), we don’t need the rest:

    Click Save and continue.

  • On the following screens you will be asked to specify fields for user activation and testing. We don’t need it yet, so you can skip it.
    Most of these options require Google to verify your request, which is a completely different level and includes many other things (website, privacy policy, etc.).
    I don’t think that’s your point.

We are almost done configuring, wait
The last step is to get the keys we still need to configure YouTube on Raspberry Pi :

  • Go back to the Accounts menu on the left.
  • Click the Create credentials button again.
  • But this time you choose the OAuth client number:
    .
  • Select the TV and Restricted Input Devices option for the type of request and enter the name field as required:
    .
  • Then click Create. Finally, the OAuth identifiers are now displayed on your screen:
    .

Copy them into your notes using the API key.
Now we have everything we need and we can configure the YouTube application on Raspberry Pi with these keys.

Install YouTube on Raspberry Pi

If YouTube is already installed on Kodi on your Raspberry Pi, you can skip this step.
I’ll only add it in case you need more information.

The procedure may vary slightly depending on the system you are using, but you will soon find an alternative (or ask me in the comments if you get lost somewhere).
If necessary, you can also read my OSMC installation instructions (text format) or LibreElec for Raspberry Pi (video).

Here is the procedure for installing a YouTube installation on Kodi :

  • From Cody’s main menu, go to Settings > Advanced Browser.
  • Choose Install from Repository and All Repositories.
  • Go to the Video Addendum submenu.
  • Search YouTube in this list.
    You can use the up arrow key to go faster to the end.
  • Finally, click on the Set button and accept the missing dependency.
    .

The first step is complete, you can now return to the main menu and open the YouTube application.
It’s in the Video Auxiliary submenu.

Configuring API keys in YouTube Superstructure

But before you view something on YouTube, the extension will remind you that you do not have permission to view this .

That’s how we solve it, now that we’ve got everything we need to set it up:

  • In the YouTube application, go to Settings:
    .
  • Click on the API tab.
    We will activate the API configuration page to avoid entering three keys directly on the Raspberry Pi

    As you can see, the URL of the page is shown here, but we need to find the port.

  • To do so, go to the HTTP Server tab and register the port:
    .

In my case the configuration page is therefore http://:50152/api
You can query the IP address under Settings > System information if you do not know it yet.

We now want to put the API keys on the website:

  • Go to the API parameter page, regardless of the URL you use.
  • This form should appear:
    .
  • Fill in the form with the previously marked key, ID and secret and click on Save.
  • You will receive a confirmation message that the personal API keys are now enabled:
    .

Good work, now you can use YouTube on Kodi and watch my videos on .

I’m joking, do what you want on YouTube, it all works perfectly now.

Use of VPN oncodes

Before finishing this guide, I would advise you to look for a VPN if you use Kodi.
Remember that VPN is an encryption technology that allows you to remain anonymous and protect data on the Internet.

Another advantage is that you can often use it to watch films or series that are not available in your country, as well as services.
It’s optional, but it’s a great addition to enhance your Kodi experience.

If you want to give it a try, I have a detailed manual for installing NordVPN on Raspberry Pi OS or Kodi, which explains step by step how to register and configure everything.

Recently I switched to a cheaper solution with Ivacy VPN.
It works very well, you can check your latest offer by clicking here.
Very soon I will give you instructions for installation on your Raspberry Pi.

Whatever the solution, there is a 30-day money back guarantee, so you won’t risk trying one now:

Conclusion

That’s all, this tutorial is quite short, but with so many steps that are not at all intuitive!
I hope you’ve found it useful and that you’ve put it to good use. Please share the following comments with me.

If you are interested in Cody, you can consult my other manuals on this subject:

Related Tags: