In Youtube video manager, I have the option to set a video to a) Public b) Private and c) Unlisted.
Using the Youtube API, is it possible to find out what the setting of a video is currently?
Thanks
In Youtube video manager, I have the option to set a video to a) Public b) Private and c) Unlisted.
Using the Youtube API, is it possible to find out what the setting of a video is currently?
Thanks
GET https://www.googleapis.com/youtube/v3/videos?part=status&id=giOAHm-dRaM&key={YOUR_API_KEY}
Use the link above to get the privacy settings of a video
It depends.
I'm going to answer in the context of the YouTube Data API v3, which is the most recent release. There are analogous methods in the older v1 and v2 of the API.
If you're authenticated as the owner of the video, you can make a
videos.list(part=status, id=VIDEO_ID)
call, and the video's status will be returned in thevideo.status.privacyStatus
property.If you're not authenticated as the owner of the video, you can make the same
videos.list()
call, but if the video isprivate
you won't get back a response. If the video ispublic
orunlisted
you will get back a video resource, and you could checkvideo.status.privacyStatus
to see what the exact privacy level is.