youtube-apiyoutube-livestreaming-api

Multiply subaccounts and liveBroadcasts query


I have account on google (myorg@gmail.com) and same account on youtube. On youtube I have 5 subaccounts (room1, room2, etc). I want to query youtube/v3/liveBroadcasts to get id of current broadcast. When I get oauth token, I select organization account and then one of rooms (room3 for example). Query work fine and shows broadcasts (completed or active), but only in one room (room3). Other rooms not listed here.

How can I query all my rooms for broadcasts? I need five different tokens (for each room)?

Verb list in liveBroadcasts didnt have channelId filter.


Solution

  • The youtube api is not user based. By that I mean when you use the Google calendar api you have access to all of the users Google calendars.

    The youtube api is channel based. When a user authorizes your application they pick which channel they want your application to access.

    The access token you have then only has access to that single channel.

    So if you want to be able to access the other channels your going to need to request authorization again for each channel.

    Each channel should have an access token which will allow you to access it.