How do I use LiveBroadcasts:list from YouTube API?

蹲街弑〆低调 提交于 2019-12-04 21:51:36

That query is returning 0 items because the liveBroadcasts/list endpoint can only be used for broadcasts that the channel your are authenticated as has created. You cannot use the list endpoint to retrieve information about anyone else's broadcast.

If you want to retrieve information on another channel's broadcast, you have to use the standard Search/list endpoint. This will return return only live events from a particular channel, without being authenticated as that channel/user, if you know that channel's channelId:

part -> snippet

channelId -> [channelId of the channel/user with the live event]

eventType -> live

type -> video (required when setting eventType to live)

HTTP GET https://www.googleapis.com/youtube/v3/search?part=snippet&channelId={channelId}&eventType=live&type=video&key={YOUR_API_KEY}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!