Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YouTube API retrieve URL of unlisted or private livestream?

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

like image 709
jsherk Avatar asked Dec 13 '25 23:12

jsherk


1 Answers

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.

like image 158
ReyAnthonyRenacia Avatar answered Dec 16 '25 22:12

ReyAnthonyRenacia