0

I want to monitor my YouTube Live stream without using Search:List. How do I use YouTube API with Videos:List and Channel-ID instead of Video-ID? Use of chart filter in conjunction with videoCategoryId parameter seems a potential solution but I fail to construct the URL correctly. I have tried the following urls. The problem with URL #1 is that I have to specify video ID which changes every time the stream restarts.

Successful URLs #1

https://www.googleapis.com/youtube/v3/videos?part=snippet&id=[Video ID]&key=[API KEY]
https://www.googleapis.com/youtube/v3/videos?part=liveStreamingDetails&id=[Video ID]&key=[API KEY]

This URL don't work #2

https://www.googleapis.com/youtube/v3/videos?part=snippet&chart=videoCategoryId=[Channel ID]&key=[API KEY]
ark1974
  • 615
  • 5
  • 16

1 Answers1

0

chart=videoCategoryId=[Channel ID] is incorrect, you should instead use chart=mostPopular&videoCategoryId=VIDEO_CATEGORY_ID VIDEO_CATEGORY_ID being one listed by VideoCategories: list as documented chart and videoCategoryId. You are trying frantically to provide your channel id to a parameter (videoCategoryId) not accepting one.

Please don't make duplicated questions and update instead your old question, as I commented it and it may solve the problem you raised here.

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33