Vimeo API for private videos - ruby-on-rails

I need to develop an application which can embed videos or lives, only for certain users.
Those videos/lives should be hosted on Vimeo.
Question is if Vimeo API supports embedding private videos through an Authorization Flow, without letting the users sign in to Vimeo from my app.
In essence, my backend should have a token which can access to those private videos and embed them only if users meet the requirements.
Does Vimeo API allows something like that? If yes, what would be the correct procedure?
I couldn't find anything like that in their docs, at least with no oAuth2 procedure.

The Vimeo Help Center has an answer for you: https://vimeo.zendesk.com/hc/en-us/articles/360042878091-Custom-video-privacy-overriding-privacy-settings-using-the-API
The API can toggle a video’s privacy settings, but it cannot be used
to allow video playback outside of the privacy settings we provide.
For example, you can use the API to set a video as password-protected
and set the video's password, however, you cannot use the API to
authenticate and bypass password protection and allow playback.
The video privacy settings that can be assigned using the API are described here: https://vimeo.zendesk.com/hc/en-us/articles/224817847-Privacy-settings-overview

Related

Permissions to access someone's private videos on YouTube

We're working on an integration with youtube channels (using Youtube Data Api v3). We need to access the videos (private also) on our user's channels.
The flow is the following:
User authorizes his/her youtube account on our site using OAuth.
We show user the list of videos on user's youtube channel.
User selects some of them (they can be private) and sends us for processing.
We need to somehow access the actual video files which the user asks us to process.
The issue is that youtube does not give any streaming URLs or download links.
Looks like, the API provides only iframe embedded code, which works ONLY for the browser, where the user is actually logged into youtube.
How can we access(can we?!) the private video, if we have the OAuth access-token of the video owner?
The YouTube Data API lets you incorporate functions normally executed on the YouTube website into your own website or application. The lists below identify the different types of resources that you can retrieve using the API. The API also supports methods to insert, update, or delete many of these resources. This in a sense means that you can see most of what you can see on the YouTube website including uploading new videos.
Downloading Youtube videos is against their Terms of Service, so the API does not support that.
Page linked above refers to Youtube ToS that states:
You shall not download any Content unless you see a “download” or similar link displayed by YouTube on the Service for that Content.
YouTube partners may have access to this feature in their API (no idea i have never seen the api), if you have access to this i suggest you contact your manager directly they should be able to instruct you on how to access it assuming the feature exists.

Is there a Youtube API endpoint to set sharing on a video within an organization?

I'm working on an app that uploads private videos to Youtube to be viewed by everyone at our organization. Luckily, Google and Youtube have an awesome company-wide permission for this, which allows for anyone with an email address within the company to view these videos.
Youtube has 3 options for video privacy status: Public, Unlisted and Private. I'd usually just go with Unlisted and call it a day, but due to the nature of these videos, I'd prefer for them to Private, then manually grant access to the video and share it with everyone at the organization. When done through the Youtube Video Manager page, here is the dialog box I'm looking for an API endpoint for:
Manual Approach
We can go through each video and check this box in each video, but that's not something that scales well. I'd love to find documentation on a Youtube API endpoint that handles this. There's a clear status.privacyStatus attribute for videos that can be set to private, public or unlisted, but nothing for this.
Does anyone know of a Youtube API andpoint to control this permission for private videos on Youtube?
I can back up the assumption from my comment that private video sharing is not possible through the Data API v3 with this article I found on the topic.
The author of the article even provides a workaround to this problem, although I strongly discourage using it, since it requires parsing sensitive account information (password) in PHP. Apart from that, the code is from 2010 and will most likely not work anymore because it is from before YouTube channels were linked to Google+ pages.

Youtube & Vimeo paid/private content

Yesterday got a enquiry from a client to build a portal similar to LMS(Learning Management System) for uploading and watching videos.
Features:
Admin can upload the videos
Registered Users who have valid subscription can view these videos on the portal and not directly at Youtube or Vimeo
My Question:
Can Youtube or Vimeo be used for hosting these videos?
Videos should be accessible only from the portal and not be listed in Youtube or Viemo public directory.
Does Youtube or Viemo have some paid/premium plan for this?
I can't speak on behalf of YouTube, but I can answer your question as it relates to Vimeo. I'd also assume that the same holds true for YouTube.
You can check out this link which shows the Vimeo video privacy options. But you could easily prevent people from seeing it on Vimeo if you use password or people I choose.
Then through the Vimeo api you could use the admin's Vimeo account credentials to request the videos specifically if your users have a valid subscription. If you use the admin Vimeo account client id and secret then you can request all the video's on that account (if it's a PRO account).
To clarify, requesting videos for the currently authenticated account through the API requires a Pro membership. Setting the privacy does not require PRO (at least not all of them do).
Yes. According to this documentation, when uploading (or updating) a video in YouTube, you can specify access controls for that video. You can indicate whether a video can be listed in YouTube search results or displayed in any other way unless the user has a URL that links directly to the video. The permission for this setting will be denied if the video is either unlisted or private. If you set the value to denied for a public video, then that video will become an unlisted video.
Here's an example from GitHub that uses statuses such as "public", "private" and "unlisted".
Does Youtube or Vimeo have some paid/premium plan for this?
Yes, Vimeo Plus plan would be enough.
Videos should be accessible only from the portal and not be listed in
Youtube or Viemo public directory.
Go to settings -> videos -> upload defaults
For privacy select 'Hide from vimeo.com'
And where it asks 'Where can your videos be embedded?' Enter your site domain (to prevet other sites from emddeing your video).
Now you can upload your videos and embed them to your site.
Can Youtube or Vimeo be used for hosting these videos?
Vimeo would be a good fit for your requirements, YouTube not so much the best privacy setting for a video would be 'unlisted' so videos won't be appearing in search results they can be played directly on YouTube.

Is it possible to allow many users to make live broadcasts using YouTube API and a single account?

I want to make a web application and I want to use YouTube API to allow my users make live broadcasts.
Is it necessary that my users log with their Google/YouTube accounts to use the live stream or is it possible to make them use this function without bothering them with this detail?
In order to create the Live Event and Live Stream objects required for a livestream on YouTube, the user making those requests must be authenticated.
From the Docs:
Your application must have authorization credentials to be able to use the YouTube Live Streaming API.
Obtaining authorization credentials guide here.
Adding a live event is similar to uploading a video. The user making the upload must be authenticated in order for the video to appear on their channel.

Is it possible to host videos uploaded to my website on youtube?

I have Java based website. I would like users to log into my website and then upload videos to youtube using my youtube account. Users should not be required to have their own youtube account since videos will be uploaded using my youtube account.
Does youtube support this scenario?
If so, is there a sample code that shows me how to do this in Java?
I have used UploadVideo.java sample provided by google (https://developers.google.com/youtube/v3/code_samples/java#upload_a_video), but it requires users to log into youtube account using their id and password. That is not my use case.
Please study the terms and conditions of the Youtube service ; I think they do not allow this:
https://www.youtube.com/static?gl=GB&template=terms
YouTube accounts
4.1 In order to access some features of the Website or other elements of the Service, you will have to create a YouTube account. When
creating your account, you must provide accurate and complete
information. It is important that you must keep your YouTube account
password secure and confidential.
4.2 You must notify YouTube immediately of any breach of security or unauthorised use of your YouTube account that you become aware of.
4.3 You agree that you will be solely responsible (to YouTube, and to others) for all activity that occurs under your YouTube account.
and
5.1.L: you agree not to access Content or any reason other than your personal, non-commercial use solely as intended through and permitted
by the normal functionality of the Service, and solely for Streaming.
"Streaming" means a contemporaneous digital transmission of the
material by YouTube via the Internet to a user operated Internet
enabled device in such a manner that the data is intended for
real-time viewing and not intended to be downloaded (either
permanently or temporarily), copied, stored, or redistributed by the
user.
You can not let other people use your YouTube account/channel. The way to do is using YouTube Direct Lite
You basically add a ytdl with playlist tag while uploading videos.
You can check Android Client for how to do it in Java.
As to whether it is technically possible, yes, see https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol
The technical problem here is users will be able to delete videos too if they have your access token with full permissions. basically you need to:
load your html page with the upload interface.
add to the onclick event of the upload button to send an ajax request to a script on your server which will:
return the access token of your account to the client
soon thereafter change the access token using the refresh token
Its still technically vulnerable though. a possible solution is to obtain the access token ONLY with the scope:
https://www.googleapis.com/auth/youtube.upload
There is a very good chance it will not be vulnerable then. You should test it.

Resources