Youtube API: Default comments settings not applying to videos published via API - youtube-api

I'm using youtube v3 API to publish videos on my channel. I want to moderate all comments made on my videos so I've selected the following in my channel setting. Note that I've chosen for all comments to be held for review by default.
Now I proceed to publish a video via API. But, it was observed that my video settings were set to Allow all comments instead of Hold all comments for review as is evident from the below image.
I've gone through the video insert API and did not find any parameter that would configure comment settings for each video. I'm failing to understand why the channel default setting is not selected for videos published via API. Is there any way through which I can change the video comment setting via API?

There is no way to specify comment options via the Data v3 API. This has been a long standing feature request. See the IssueTracker thread.

Related

How to retrieve video including paid promotion by YouTube API

We want to retrieve video data including promotions.
Is there a way to get it with the YouTube Data API or the YouTube Analytics API?
Is there any other way?
A video that includes a promotion is a video that displays something like the image below.
Click to move to the following page.
https://support.google.com/youtube/answer/154235
Since you are only interested in knowing whether or not a video (based on its id) includes paid promotion, as far as I know there isn't any official YouTube Data API v3 endpoint answering your question.
However you can check if the video includes paid promotion by checking whether or not the YouTube webpage contains paidContentOverlayRenderer. You can proceed this way for instance:
curl -s https://www.youtube.com/watch?v=VIDEO_ID | grep "paidContentOverlayRenderer"
If something is returned it means that the video includes paid promotion otherwise it doesn't.

Upload video to different channel using Youtube API, Ruby

I use Yt gem to work with Youtube API and upload video using Yt::Account class.
The problem is that I need to allow user to choose channel to upload to – for example, one user has a second channel related to Google Plus page and this user should be able to upload video to that Youtube channel, not user's default one.
It seems like Yt misses the ability to specify channel (or I missed something).
I found also examples from Google https://developers.google.com/youtube/v3/code_samples/ruby but all it says is "upload a video to the channel associated with the request" – and nothing about how to associate different channel.
Any help is appreciated

Can I use YouTube API to enable YouTube Live Streaming?

I'm developing a YouTube live streaming related program. I know there're APIs to create/list/delete broadcasts and live streams. But all these are assuming that YouTube Live Streaming is already enabled on your account.
I tried to but failed to find any API with which I can use to enable YouTube live streaming on my account. Is there such an API?
As far as I can tell, there is not. As you can see here: https://support.google.com/youtube/answer/2474026?hl=en, in order to create live events on youtube an account must be verified and in good standing.
If you are making the API requests using a YouTube account that fulfills these requirements you can use the YouTube Data API to create liveBroadcasts, otherwise you will likely receive an insufficientPermissions error. This error is detailed here: https://developers.google.com/youtube/v3/live/docs/errors#youtube.liveBroadcasts.insert-insufficientPermissions-liveStreamingNotEnabled-permission.userNotEnabled
One potential way you could tell if an account is able to create live events programmatically would be to call the channels.list() method, and return the status. The status of the channels will have status.longUploadStatus. Long uploads also require an account to be verified and in good standing, so if this value returns allowed you likely have the permissions to work with live events. More details of this can be found in the YouTube Data API documentation.
Let me know if you find information to the contrary.

Do videos uploaded via the YouTube API respect default monetization settings?

I experienced that with with Google-cl there is just no option to enable monetized content; imported from the command-line.
Is it even possible via api?
I set the default settings in youtube to monetize new content and via the youtube website manual uploaded content gets configured correctly. But using google-cl this setting is ignored.
Can someone point me in the right direction or is it just not possible?
I have 4 Videos per day which get uploaded and don't want to edit everyone by hand.
Videos uploaded via the YouTube Data API (which is what google-cl uses under the hood) should ideally respect the default settings in your account for new videos.
I'll follow up internally to see if there's any reason why you're not seeing that happen in practice.

YouTube API v3: Liking a video with no channel set up

I have code that will "like" a video through the YouTube API v3. At first, my code was throwing a 403 Forbidden error, and I tracked this down to the fact that my youtube account did not have a channel associated with it. I created a channel by going to youtube.com, and clicking the "add to" link underneath a video. A popup came up that said "Set up your channel to create your playlist on YouTube". As soon as I filled out that form, and clicked continue, the code stopped returning a 403, and started working.
Is there anyway to "like" a video without having to go through this channel setup process? Or if not, is there any way to tell if a user does not have a channel on their account, and prompt them to set it up if needed?
For reference, my code is written in python and is based off of the example here:
https://developers.google.com/youtube/v3/docs/playlistItems/insert
Thanks,
Josh
Edit: There's now a channel.status.isLinked property which will reliably tell you whether a channel resource is "linked" in v3.
That being said, it is possible to like a video using the YouTube.com web interface for an account that doesn't have a channel, and I also believe that it was possible using v2.1 of the legacy GData API. The fact that you can't do that in v3 sounds like a bug to me, and I'll escalate that internally.

Resources