12

I work for a school that has an institutional YouTube account (Google Apps for Education). The video privacy options are Public, Unlisted, and Private.

The important bit: Private videos can be shared with either: - the institution (i.e., all students with a school account), or - a list of specific email addresses.

We have a tool that uses the v3 YouTube API (Java) to automatically upload videos to YouTube.

I can use the API to set privacy:

VideoStatus videoStatus = new VideoStatus();
videoStatus.setPrivacyStatus("private");

But how do I set sharing (e.g., "Shared with school.edu") using the YouTube API? I assume it's possible because it can be done (manually) using YouTube's online Video Manager.

TylerH
  • 20,799
  • 66
  • 75
  • 101
  • This related SO post - [Google Youtube Data API: Private videos with API key](http://stackoverflow.com/questions/21890982/google-youtube-data-api-private-videos-with-api-key) might help. :) – Teyam Jun 02 '16 at 16:34
  • Thanks for the reply, @Teyam. Unfortunately, that post is unrelated. My question: How can I use the YouTube API to set privacy-status = "private yet shared..." when programmatically _uploading_ a video to YouTube? – John Crossman Jun 06 '16 at 01:20
  • How are you sharing the private video? Video -> Video Manager -> Basic -> Private -> Share -> Share with Others (by entering their email)? – JAL Jun 20 '16 at 13:16
  • @JAL: exactly, yes – Grimace of Despair Jun 22 '16 at 07:37

2 Answers2

4

It seems more people are being left in the dark about this, but most questions date from some years ago.

E.g.: YouTube API: Private Video Access which links to a YT dev reaction: https://groups.google.com/forum/#!topic/youtube-api-gdata/LkfDtwxjWp8/discussion (May 2012)

There is not, unfortunately, and I don't believe that specific functionality will be added.

Moreover the bug JAL linked to dates from April 2014, so it seems like private video's come with their own set of problems.

To conclude, I'll be sticking to the unlisted video approach, which seems like a good trade-off for me. I can return the unlisted video's for my own set of users, which gives me control on that level. If some user feels like mailing around the YouTube link, that's just too bad. As the aforementioned link states:

Sometimes, security is about compromise. At one end of the spectrum, you can lock things down completely so that no one can access the data. At the other end, the most usable and accessible data will not be secure.

Community
  • 1
  • 1
Grimace of Despair
  • 3,436
  • 26
  • 38
1

After reviewing the YouTube Data API v3 documentation, I have come to the conclusion that this is not possible with the current API.

This may be related to Issue 6265 that is currently reported as an API defect. If this does not address your use case I strongly suggest you file an enhancement ticket to gdata-issues.

JAL
  • 41,701
  • 23
  • 172
  • 300