There are 3 ways that i can access a stream from a channel /live:
- https://youtube.com/channel/channel_id/live
- https://youtube.com/user/username/live
- https://youtube.com/c/channel_name/live
I know how to get it from the channel_id and i know how to get the channel_id from the username. My problem is on the 3rd case. Is it possible to get the channel_id from this custom URL?
Second question. The way i get the video URL from the channel id is using the following endpoint:
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId={CHANNEL_ID}&eventType=live&type=video&key={YOUR_API_KEY}
I've notice that if the channel has a live stream going on at /channel-id/live and have other stream on with specific URL I have no warranty that the video URL that i get is the one associated with the /channel-id/live. Is that a way to get this specific video?