Permissions to access someone's private videos on YouTube - 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.

Related

YouTube Content ID API Manual Claims

I’ve been doing some research on the YouTube Content ID api and researching about making claims, there is a “manual claim” property, but it’s noted as restricted with semi-minimal information about it.
params.isManualClaim - restricted
https://gist.github.com/esvit/27bc8f26c09c7a3a0c18
My question is, what does restricted actually mean? Is it restricted to only partners that have access to perform manual claims, or is it restricted to everyone and only available to internal YouTube processes?
Anyone have any ideas?
Thank you!
Here is the reason from the documentation.
Note: The YouTube Content ID API is intended for use by YouTube
content partners and is not accessible to all developers or to all
YouTube users. If you do not see the YouTube Content ID API as one of
the services listed in the Google Developers Console, see
www.youtube.com/partner to learn more about the YouTube Partner
Program.
The YouTube Content ID API lets developers build applications that
interact directly with YouTube's rights management system. The system,
which has an online interface at www.youtube.com/content_id ,
enables content owners and administrators to provide YouTube with
metadata, ownership information, and policy information for their
assets.
As a YouTube partner, you can use the API to create new assets and
manage existing assets. You can also retrieve information about your
Content Manager account, including a list of saved policies that you
can apply to your claimed content.
In addition, by combining the YouTube Content ID API with the YouTube
Data API and YouTube Player APIs, you can enable your application to
also upload, manage, and play YouTube videos.

Youtube auto subcribe is possible with api v3?

I want to know how can I do auto subcribe an account with youtube api v3. Can I it to register with youtube account. For example, some script do auto post share on your twitter account.
I do not personally use YouTube API, but after looking over the YouTube Data API's documenation pages, it seems that the API supports a method to subscribe users to a channel.
The API Overview documentation page states:
A subscription resource contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video.
You may view all the methods supported by the subscription resource on the subscription resource's documentation page. The method that you would need is called insert. This allows you to automatically subscribe an authenticated user to a specified channel. The insert method's description can be found on its page along with detailed usage examples. The page provides examples in Apps Script, Java, PHP, Python, and Ruby; however this method can be used any programming language which supports the YouTube Data API Client Libraries.

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.

Get YouTube playlist videos anonymously

I would like to display a list of videos from a YouTube playlist in an intranet application.
Is it possible to get the list of videos from a YouTube playlist using the Data api (or any other way) without requiring the user to login?
Everything that I have read so far in the YouTube data api requires the user to be signed in to authenticate.
unfortunately, you can't access youtube data API with anonymously user.
Your application must have authorization credentials to be able to use the YouTube Data API.
The Developers Console associates your credentials with the APIs that you indicate that your application will use. Note that the Developers Console does not allow you to select the YouTube Data API (v2). However, authorization credentials for the v3 API will also work for the v2 API.
If possible, you should actually use YouTube Data API (v3) rather than the v2 API in your application. The YouTube API blog explains some of the benefits that the newer API offers, and we have added a year's worth of additional functionality to the API since that blog post!
related link : https://developers.google.com/youtube/2.0/developers_guide_protocol_oauth2#OAuth2_Client_Side_Web_Applications_Flow

Resources