Using Youtube Data API makes my videos private on upload - youtube-api

I've just made an "app" that uploads videos in a given folder, the program works, however whenever I upload a video through my program, it makes the video private (locked). I then get a mail saying that my program has not yet been approved. I have tried setting status.privacyStatus to both unlisted and public, without succes.
Any idea on how to get my application approved so I can upload public videos?
I suspect it might have to do with Oauth, however I am not sure where I went wrong

According to Google support's article Videos locked as private, the issue that you've described happens by design:
For videos that have been locked as private due to upload via an unverified API service, you will not be able to appeal. You’ll need to re-upload the video via a verified API service or via the YouTube app/site. The unverified API service can also apply for an API audit.
To ensure your video isn’t locked private again, don’t post content that:
[...]
Has been uploaded by an unverified third party API service.
As unfortunate as it is, until your app gets approved by Google, if needing to make video content publicly available, you have no other option than to upload that content manually by means of YouTube's Web UI (or use a tool that accesses that UI programmatically; but, as far as I know, this kind of activity is forbidden by the TOS docs).
The official document of the Videos.insert API endpoint specifies the very same requirement as above:
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.
The entry of API Revision History related to this issue reads as follows:
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 project must undergo an audit to verify compliance with the Terms of Service.
Creators who use an unverified API client to upload video will receive an email explaining that their video is locked as private, and that they can avoid the restriction by using an official or audited client.
API projects created prior to 28 July 2020 are not currently affected by this change. However, we strongly recommend that all developers complete a compliance audit for their projects to ensure continued access to the YouTube API Services.

If your app is inteded for private usage, they won't approve it.
The only solution is not to use their API, but luckily there are some good modules to upload without API.
Here's one I made (node.js): https://www.npmjs.com/package/node-apiless-youtube-upload
import YoutubeUploader from 'node-apiless-youtube-upload'
const youtubeUploader = new YoutubeUploader()
youtubeUploader.promptLoginAndGetCookies().then(() => {
youtubeUploader.uploadVideo({
videoPath: 'C:/PATH/TO/VIDEO.mp4',
title: 'TITLE',
description: 'DESCRIPTION',
thumbnailPath: 'C:/PATH/TO/THUMBNAIL.mp4',
visibility: 'public'
})
})
Also there's one for python if you search for it (it's selenium based).
Good luck!

Related

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

YouTube may disable your inactive project's access to the YouTube Data API Service

I was using Youtube Data APIto get youtube video but after getting mail from youtube which says api is disable due to inactive.
Youtube Data api not working since it was disabled by youtube because of inactive for 90 Days. I am not able to call(It is enable in API Console) it even with delete and add new delete back. Please help.
Error shows when i am calling from Web Browsers with api Key i also tried to generate new API key also delete and regenerate new api key but still no luck.
"Access Not Configured. YouTube Data API has not been used in project
264969722993 before or it is disabled. Enable it by visiting
https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=264969722993
then retry. If you enabled this API recently, wait a few minutes for
the action to propagate to our systems and retry."
There are things you can do to try and solve this issue. This first option is to apply for an API exception by filling out this out this form. I've filled out this form and am waiting for a response.
The second option is to create a new project and use that project to generate an API key. Because Google has only disabled access to the Youtube Data API for your current project, the new project's API key should work just fine. I've tried this and can confirm this works. This is probably the more hassle-free option if you have extra projects to spare as Google only allows 10 projects at any point in time.
I'm in the same position, disabled for no calls in 90 days. You can request an exemption but after about 25 back and forth emails it's clear that it is just a smokescreen. After explaining what it's used for they then wanted screenshots, then videos of you using the application, how we use the videos we pull up, and then a shot of the room where it was being used. They even asked who made the video we were looking at (we have no idea!). They want your whole business model and what you do. It was just never ending questions and more stuff to send them. After about 2 1/2 months of slow back and forth, I get a message saying I am out of compliance.
Our application uses YouTube to pull up videos for manufacturers product for research and training in a small training/conference room for internal use only. That's all!
Nothing was out of compliance.
This is the email we received:
Hello ,
We have reviewed your quota extension request for project number
#### and have revoked the allocated quota for your API Client(s) as it is out of compliance on the following YouTube API Services -
Developer Policy:
Policy F. 1 (User Experience - YouTube Look and Feel) Please do not
reply to this email, you may complete and submit this form to re-apply
once the above concern has been addressed.
Thanks, YouTube API Services team
The form link in the email is just a link to start the whole process over again.
According to YouTube policy
If your API Client's quota is reduced or eliminated, you may reapply for quota or a quota extension, and YouTube will review that application based on YouTube’s determination of your expected use of the YouTube API Services.
https://developers.google.com/youtube/terms/developer-policies
I suggest reapplying.
To add to avatarhzh's answer:
If you have already used up your initial cap of max. 12 projects and your channel is a brand account and you do not want to go through the process of applying for more quota/getting back your previous quota, you can also create new projects on a different google account and then add that account to your channel as a manager. It is then possible to access your channel through this new account via the youtube data API.
If your channel is not a brand account yet, you can move your channel to a brand account. This allows you to add different google accounts as managers/co-owners of the channel. Warning: certain things (e.g. comments) cannot be transferred when moving to a brand account.

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.

Youtube api player for android copyright issue

The new android youtube api allows developer to embed and play videos in the third party app. I made android app that shows list of youtube videos and show video in the app (not using youtube official app).
I want to know if there will be any copyright issues for the same.
Do I need any permissions or something?
Posting this question here because youtube has mentioned to use stack-overflow with tag "youtube-api" as the official support group. See this link
https://youtube-eng.googleblog.com/2012/09/the-youtube-api-on-stack-overflow_14.html
If you are using the official API to show videos, either on Android or for a Web App, then this should not be a concern as the API will only give you videos that haven't been restricted by the content owners (or if there is a concern over content, the videos will be removed, and hence your apps will no longer be displaying them).
When it comes to uploading, if you utilize oAuth authentication with v3 of the API then users who upload videos will be responsible for whatever is uploaded to their YouTube account through your app. That is, you won't have to worry about doing copyright checks yourself, as that will happen once the video ends up on the YouTube servers (this is the best reason to utilize this authentication method; if an app instead were to forego oAuth authentication and have uploads go into the app owner's account, then the app owner could be liable for copyright infringing videos sent through the app).
Note that this isn't legal advice or an official YouTube perspective; just my interpretation of reading the terms of service (which you should read as well).

Resources