Installing YouTube API Keys on Vero 4K

I am seeking help please to install YouTube API keys onto my Vero 4K. I followed the thread offered by fzinken in Feb 2020 which is a great YT video which even I have been able to followt up to the point where the video demo shows opening a new browser window and entering an IP address and port number. I assume this to be the address details from the “Kodi” device. This brings up a new entry box into which the keys created on Google are to be added.

Where I am stuck is that I cannot access my Vero 4K from my laptop. I am working on a laptop using Wifi to access Google in order to follow the instruction for creating the API project etc. Although my laptop and the Vero 4K are on the same subnet, Wifi security prevents L2 traffic between the AP and other addresses on the subnet.

To reconfigure my network will be difficult and I am hoping there is another way to get the keys from my laptop into the Vero 4K. Please could somebody help me here?
Regards,
Budge

Can you access the Vero by SSH or is that also blocked?

Details regarding how to access the command line interface can be found here on our Wiki: Accessing the command line - General - OSMC

Hi fzinken and many thanks for the reply. Sadly no such luck for ssh. I can however plug in a keyboard and mouse and it should be possible to save keys to USB stick on laptop and move them over.

I confess am not sure exactly how to do this. If I drop to CLI I have no idea where to save the keys. Will start on this route and call for help when I get stuck.

Many thanks,
Budgie

Why not simply plug an ethernet cable into the laptop just to accomplish this task? No need to “reconfigure your network.”

The keys go into .kodi/userdata/addon_data/plugin.video.youtube/api_keys.json

{
    "keys": {
        "developer": {}, 
        "personal": {
            "api_key": "api_key", 
            "client_id": "client_id", 
            "client_secret": "client_secret"
        }
    }
}
1 Like

OK and yes of course. Problem was I had no spare ports on switch but have now made one available, so now I have laptop with lan connection and Vero 4K on same subnet and I can now ping the vero from the laptop. The vero is running osmc but…

Sorry to be thick but now how can I connect to Vero from browser on laptop. I tried http://:50152/api as in the demo YT video but get no response.

I can now access the vero using ssh and have logged in so looks like I will have to work on cli but I had hoped the demo would make it easier.

I hope you type http://<IP address of the Vero>:50152/api and you configured it respectively in the Youtube Addon under HTTP Server (with the “Listen on IP”) and enabled it on the API page.
BTW you also can just manually enter it in the Youtube Addon - API section with your remote control (or keyboard). The Webserver is just to make the copy/paste easier.

Hi, I did. My earlier post omitted the IP but I believed I had it right. I set up the device address on “Listen on IP” not “Select listen IP” which I assume is right. All I get is Error code 403.

Looks like I can do it with keyboard but I would like to understand what I am doing wrong when you have time as I have another less accessible device to sort out next.

A problem I have, not being a coder and doing this for the first time is knowing the syntax and what goes where in your previous message. Will not try cli yet!

Many thanks for guidance.

Share a screenshot of the HTTP Server and API Page.

Well the first entry describes the field and the second is your key.

"api_key": "api_key",

becomes

"api_key": "W7QJxvCHsdbs733jsSETu_Cg",

Hi and many thanks. I had half worked this out but was not sure about the inverted commas and the other stuff, ie if I should enter names etc. Will press on with this later. I also see there is an option on the google site to download the keys as a .json file so I will also try that and copy it where you advised above.

Meanwhile I have no idea how I can take a screen shot. All I have is an HDMI screen and controller with an added keyboard plugged into usb slot.
For HTTP Server I have:-
Listen on IP
Select listen IP
IP whitelist (comma delimited)
Check my IP

For API I have;-
API Key
API Id
API Secret
Users Allow developer keys
Advanced <http://:/api (see HTTP Server) shown like this not with actual address showing.
HTTP Server Enable API configuration page

Hope this is clear.

Well that didn’t go well. I had been using the arrow keys as brackets but they must be special characters so they disappeared from my post. Will try square brackets!!!

For HTTP Server I have:-
Listen on IP [my device ip address showing here]
Select listen IP [blank]
Port 50152
IP whitelist (comma delimited) [blank]
Check my IP

For API I have;-
API Key [my key shown]
API Id [my API Id shown]
API Secret [secret shown]
Users Allow developer keys [highlighted as enabled]
Advanced <http://:[ipaddress:port/api] (see HTTP Server) this line is shown like this not with actual address but I think this is correct as it seems it cannot be edited.
HTTP Server Enable API configuration page [highlighted as enabled]

Will try this.

OK, I have checked the keys in my vero device using ssh access and these are all OK.
My problem now is that if I enter the codes from my first youtube login into my browser I am then taken to my google sign-in and I get the following error:-

Authorisation Error
Error 403: access_denied
The developer hasn’t given you access to this app. It’s currently being tested and it hasn’t been verified by Google. If you think you should have access, contact the developer.
Learn more
Request Details

response_type=none
client_id=*.apps.googleusercontent.com
access_type=offline
scope=https://www.googleapis.com/auth/youtube

Where am I getting it so wrong?

I had that same error until I added myself as a user in the API configuration. It did not make sense, as I was the owner, but it worked.

1 Like

Hi and many thanks for sharing your experience. I had not tried this yet and meanwhile I find I am getting access to YT without any pop-ups or adverts and all good so far. I shall have to check exactly why I need more from sign on completion but no time to spare on this right now!
Thanks again,
Budgie

I went through the process of setting the keys, logged the device in ok but then 403 rate limit error. No idea how/why I’m getting that with my new details

Just a quick footnote having returned to this and succeeded in getting it working. None of the instructions are clear or exactly what worked for me but I have found the easiest way to get this working is to in two parts, the work on browser setting up the API and getting the three required keys the API key, the Client ID and the Client secret. Once these have been saved to a file they can be copied to the Vero device and fzinken copied into the file .kodi/userdata/addon_data/plugin.video.youtube/api_keys.json
Once this is done you can use the remote to complete the settings pages for API and HTTP and return to the browser to sign in using Google.com/devices. I confess it took me a few tries to get it all working so keep trying. Worth it in the end and thanks again to fzinken for his guidance.