If you followed the previous post and started using Kodi, you might be wondering what else you can do with it other than sharing videos over the network. Kodi has great community support and offers many add-ons. One of those add-ons is for YouTube. The setup process can be tricky for some users, so I’d recommend reviewing the pros & cons at the end of the article. Also, skim through the steps involved before you start to have a good idea of what you are getting into.
Let’s get started with the installation.
Part 1: Install YouTube Add-On on Kodi
Step 1: Select Add-ons on the left menu.
![Kodi add-ons screen](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22065048/screenshot00000.png)
Step 2: Click the Enter add-on browser button in the middle of the screen.
![Add-ons showing the menu](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22065214/screenshot00001.png)
Step 3: Scroll down and click on the YouTube add-on.
![Video add-ons with YouTube selected](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22065224/screenshot00002.png)
Step 4: Click the Install button at the bottom right of the screen.
![YouTube add-on properties with Install button highlighted](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22065243/screenshot00003.png)
Step 5: If prompted to install additional add-ons such as InputStream Helper, click OK.
![Dialog box asking to install additional add-ons](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22065308/screenshot00004.png)
Step 6: Wait for the installation to complete.
![YouTube installation in progress](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22065443/screenshot00005.png)
Step 7: When prompted to Execute setup-wizard, select Yes.
![Dialog box asking to execute setup wizard](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22065434/screenshot00006.png)
- Select your language and region
- Decide if you want to perform geolocation. This is used in My Location settings.
Step 8: You should see a checkmark next to the YouTube add-on indicating that it has been successfully installed.
![YouTube installation complete](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22065511/screenshot00008.png)
Step 9: Test your installation by clicking on Add-ons on the left menu and YouTube add-on. You should see a home screen like this:
![YouTube add-on main screen](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22065845/screenshot00009.png)
Now that you have the YouTube add-on running on your Kodi let’s set up your Google account to generate API keys.
Part 2: Create YouTube API Keys
YouTube add-on requires you to enter your own API keys. This way, all the API calls the add-on makes will be made with your keys.
Step 1: Sign in to Google Cloud Platform with your Google account (If this is your first time, agree to the Terms and Conditions and continue).
![Google Cloud Terms of Service agreement screen](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22070911/api-01.png)
Step 2: Click the Create Project button at the top right:
![Create Project in Google Cloud](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22072603/api-02-1.png)
Step 3: Give your project a descriptive name and click Create.
![Enter a Project Name](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22072605/api-03.png)
Step 4: Click APIs & Services → Library on the left menu
Step 5: Search YouTube Data API in the API Library and select the first item in the auto-complete (youtube data api v3 in this example)
![Search YouTube Data API](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22072739/api-04.png)
Step 6: Click on YouTube Data API v3 again
![Select YouTube Data API v3](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22073405/api-05.png)
Step 7: Click the Enable button
![Enable YouTube API](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22073406/api-06.png)
Step 8: Click Credentials on the left menu
Step 9: Click Create Credentials and select API key
![Create API key](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22073533/api-07.png)
Step 10: Note down your API key and click the Edit API key button.
![Write down API key](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22073858/api-08.png)
Step 11: As per the warning above, the key is unrestricted by default. Click on Restrict key option, select YouTube Data API v3 and click Save
![Restrict API usage yo YouTube](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22074024/api-09.png)
Step 12: Click OAuth consent screen on the left menu
Step 13: Select External and click Create.
![OAuth consent screen](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22074351/api-10.png)
Step 14: Give a descriptive name to the app, such as Kodi YouTube AddOn and select your email as the User support email.
![App name](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22075018/api-11.png)
Then scroll down to the bottom and enter your email address again as Developer contact information, and click Save and Continue.
![Developer contact information](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22075019/api-12.png)
Step 14: Click Save and Continue on the Scopes and Test users pages and click the Back to dashboard button on the Summary page.
Step 15: Click Credentials again and Create Credentials. This time select OAuth client ID from the menu.
![Create OAuth Client ID](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22080549/api-13.png)
Step 16: Select TVs and Limited Input Devices from the list. give it a name (such as your Kodi instance name) and click Create.
![Select application type and name](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22080550/api-14.png)
Step 17: Note down your client ID and client secret. Then, click OK.
![Write down OAuth client ID and secret](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22080557/api-15.png)
The next step is to enter the API key and the OAuth credentials in your YouTube Add-On. Since the add-on is running on your Raspberry Pi, entering these long random values is not easy. The easiest way to do that is to enter it by using the HTTP server. In the next part, you will configure your add-on and set up your user.
Part 3: Configure YouTube Add-On
Step 1: Enable the API configuration page by turning it on Settings → API
![Enable API configuration page](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22085222/screenshot00010-1024x576.png)
Step 2: Then, click HTTP server and note the port it’s running on.
![HTTP server settings](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22085224/screenshot00011-1024x576.png)
Step 3: On your computer, go to the URL: http://{Kodi IP}:{HTTP Server Port}/api
You should see a page like this:
![API key page](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22090321/yt-01.jpg)
Enter your API key, client ID (as API Id) and client secret (as API secret). Then, click Save.
![Success message](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22090501/yt-02-1024x403.png)
Step 4: Now, go back to your Kodi instance and open the add-on. Click Sign In.
![Kodi main screen](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22091537/screenshot00012.png)
Step 5: As the message says, you must sign in twice. Click OK to dismiss the message.
![Log in twice message](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/22091538/screenshot00013.png)
Step 6: You should see a code on your Kodi screen.
![Authorization code](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072424/screenshot00014.png)
Go to google.com/device and enter the code on your computer.
![Connect a device screen](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072438/perm-05.png)
Step 7: Select the account to use
![Select account to use](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072409/perm-01.png)
Step 8: Click Allow
![Allow access](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072612/perm-02-1.png)
Step 9: You should see a successful connection message
![Successful connection message](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072637/perm-03-1.png)
Step 10: You should see a new code on your Kodi screen. Repeat steps 6 – 9 to authorize the app again. If all goes well, you should now see more items in the YouTube menu, such as My Subscriptions. You can now browse your videos, channels etc. 🎉
![Kodi main screen with logged in user](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072508/screenshot00015.png)
Troubleshooting Second Authorization: 403 Access Denied Error
If you got an error during the 2nd authorization that looks like this
![403 access denied error](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072442/perm-06.png)
Then, you have to follow the steps below:
Step 1: Click APIs & Services → OAuth Consent Screen. Your app should be in Testing status.
![Publishing status showing Testing](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072437/perm-04.png)
Step 2: Click Publish App and confirm when asked to Push to Production
![Confirmation to push to production](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072443/perm-07.png)
Step 3: Go to google.com/device and enter the code again.
Step 4: You will see a warning message saying Google hasn’t verified this app. Click the Advanced link.
!["Google hasn't verified this app" warning](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072500/perm-08.png)
Step 5: Click Go to {YOUR APP NAME} (unsafe) link
![Go to app link showing](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072502/perm-09.png)
You should now see on your Kodi screen that you are logged in and see My Subscriptions in the menu.
Part 4: Usage and Review
Congratulations on completing a lengthy setup. See below a list of pros and cons based on the setup and initial usage experience:
Pros & Cons
✅ Pros
- No ads (If you tried to get rid of in-video Youtube ads by using a Pi Hole, it looks like it doesn’t work: How do I block ads on YouTube?)
- No need for a separate streaming device
❌ Cons
- Setup is cumbersome
- User experience could be better
Even though the user experience feels a bit different initially, I hope it will grow on me.
👍 Multiple Users
You can create multiple users and easily switch between the users. You can create a new user by clicking Settings → Users → Add a user. Adding a new user involves Steps 4 – 10 of Part 3.
![Add a user screen](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072509/screenshot00017.png)
Then, you can easily switch between accounts by using the Switch User option.
![Switch user menu](https://cdn.myhomelab.rocks/wp-content/uploads/2022/08/24072533/screenshot00018.png)
Even though you sign in to a different YouTube account, it still uses the same API key to fetch your content, so you won’t have to generate new keys.
Conclusion
Setting up a home lab requires some work and maintenance, but in the end, it’s rewarding as well. In this tutorial, you learned how to install the YouTube add-on on Kodi and how to configure Google API to access your YouTube account. I hope you enjoyed it. See you in the next post.