Youtube-data-api private upload - youtube-api

i tried to automate video upload to my YouTube channel using YouTube data API v3, everything works perfectly except that the videos are uploaded as private and locked that way.
i know it is a restriction by design and the scope verification requires privacy policy page and a domain which i don't own as an individual. Making it internal is not an option neither, since it requires organization and google workspace.
how can a normal user be able to automate uploads using youtube data API.

Related

YouTube lifetime token for a server

I'm trying yo create a private application that manages a YouTube account all time, not different ones for clients, only one and the client has access to create a video streaming or other functions with YouTube API v3. Only I found how to the clients logging and manage their accounts but not only one channel all time.
How i can do that?
YouTube lifetime token for a server
What you are refering to is something called service accounts. Its designed for server to server interaction. This type of autohrization is not supported by the YouTube API you need to use Oauth2.
I'm trying yo create a private application that manages a YouTube account all time, not different ones for clients, only one and the client has access to create a video streaming or other functions with YouTube API v3.
You may have some issues here. You will need to create a project on Google developer console for your application and create Oauth2 credetinals.
In order to upload videos that are public your app will need to be verified. Application verification takes time with youtube api. Make sure to apply for it early.
Only I found how to the clients logging and manage their accounts but not only one channel all time.
YouTube authorization is channel based. Your users will need to be authorized for each one of their channels. There is no way to authorize a single user to access all of their channels in one go. It has to be per channel.

Google YouTube Data v3 API Blocked From Uploading Videos

Recently I have been using multiple scripts that allow you to upload a video via the YouTube Data v3 API from GCP.
However, the videos always gets auto privated and locked. I have done research and found out it's because you need verification on your API key or whatever.
Does anyone know how to get the API key verified or to be able to use the API to upload videos without it being auto locked to private?
Does anyone know how to get the API key verified or to be able to use the API to upload videos without it being auto locked to private?
To be clear api keys are used to access private user data. To upload videos to YouTube you need to use Oauth2 and be authorized to access a users YouTube account
However, the videos always gets auto privated and locked.
If you check the documentation for Videos: insert you will find the source of your issue and what you need to do to fix it.
All videos uploaded via the videos.insert endpoint from unverified API projects created after 28 July 2020 will be restricted to private viewing mode. To lift this restriction, each API project must undergo an audit to verify compliance with the Terms of Service. Please see the API Revision History for more details.
Go though the verification process and then you will be able to upload public videos.
Unverified apps
What you need to know about Google verification

How can I upload videos into my youtube account without oAuth consent screen using YT data API v3

I want to upload local videos into my youtube account through my web app without oAuth consent screen. I am using node js as server and react js as frontend.
You need to understand the difference between private and public data. Public data is data that is not owned by any user and is available publicly.
Methods like Search List for example access public data available on YouTube.
Private data is data that is owned by a user. In order to upload to your YouTube account you need permission to upload to that account.
The Videos.insert method as you can see by the documentation requires that the user have consented to your application accessing their YouTube account. They must have consented to your access with one of the following scopes.
So the answer to your question is that you cant. You need to consent to authorization before your application is going to be allowed to upload to YouTube
upload public videos
Please remember that all videos uploaded via the videos.insert endpoint from unverified API projects created after 28 July 2020 will be restricted to private viewing mode. To lift this restriction, each API project must undergo an audit to verify compliance with the Terms of Service. Please see the API Revision History for more details.
Your application will need to go though application verificatin process before any of the videos you upload will be public

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 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