Reputation: 6472
I want to use the YouTube API to check for a current livestream and get it's URL. The livestream is UNLISTED.
I can successfully get information on my PUBLIC livestream from my channel using this:
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=MyChannelId&type=video&eventType=live&key=MyApiKey
However it does not return any results when the livestream is UNLISTED.
What am I missing here?
EDIT:
I am using PHP if that matters.
It appears that this is probably what I am trying to implement: https://developers.google.com/api-client-library/php/auth/service-accounts
And perhaps I will need to use liveStream or liveBroadcast? https://developers.google.com/youtube/v3/live/getting-started
Upvotes: 3
Views: 2815
Reputation: 17613
This is the intended feature for any UNLISTED videos/streams. They cannot be accessed like regular vids. UNLISTED vids can only be accessed through:
anyone who knows the video's unique video ID can retrieve the video metadata.
as mentioned in Youtube properties.
Also Jeff Posnick of Youtube answered in this google forum:
The public videos feed doesn't contain any information about private or unlisted videos, so they won't be returned in the results.
Upvotes: 1