Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Youtube Data API makes my videos private on upload

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

like image 691
wardz Avatar asked Sep 26 '20 15:09

wardz


People also ask

Are uploaded YouTube videos private?

From the left menu, select Content. Point to the video you'd like to update. To see your live uploads, select the Live tab. Click the down arrow under "Visibility" and choose Public, Private, or Unlisted.

Why is my YouTube video private?

If your video is identified as violating our policies, it may be locked as private. When a video is locked as private, it will not be visible to the public. If a viewer has a link to the video, it will appear as unavailable.

Can I upload video to YouTube with API?

There are two ways to upload videos to YouTube. You can do it manually though the YouTube web application or you can do it programmatically though the YouTube data api. The YouTube data api has a cost based quota system.

How much video can I upload on YouTube using API?

Uploads a video to YouTube and optionally sets the video's metadata. This method supports media upload. Uploaded files must conform to these constraints: Maximum file size: 256GB.


2 Answers

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.

like image 82
stvar Avatar answered Dec 31 '22 19:12

stvar


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!

like image 21
Gladiatortoise 1 Avatar answered Dec 31 '22 19:12

Gladiatortoise 1