Enable Content ID Matches via YouTube Partner API - youtube

I am using the YouTube Partner API to upload videos on the partner's behalf for monetization tracking and reporting.
The process is as follows:
User uploads video to website.
Video is pushed to channel owned by partner, asset is created, claim is created for the video uploaded to the partner channel.
Video is pushed to the user's public youtube channel
All of this is working, but I cannot figure out how to set the "Enable Content ID Matchs" option that is found in the YouTube CMS videos section. This needs to be enabled so the video that is uploaded to the user's public channel will be matched.
Anyone know if this is possible through the Partner API?
Edit: The Partner API, is actually called Content ID API, the classes are YouTubePartner.

Not sure if you're still looking for an answer to this question, but since I just ran into the same problem, I figured I'd share what I found.
Per the google developer docs:
Once you have uploaded the video and created an asset, you'll need to update the AssetMatchPolicy on the asset. The AssetMatchPolicy is where you specify what would constitute a match to your content. You can exclude certain territories, and also set required duration minimums for matches. The doc uses the following as an example of a request body for a policy that tracks videos worldwide and matches longer than 10 seconds:
{
'name': 'Track Everywhere 10s.',
'description': 'Track Everywhere matches longer than 10s.',
'rules': [{
'action': 'track',
'condition': {
'requiredTerritories': {'type': 'exclude', 'territories': []},
'requiredReferenceDuration': [{'low': 10}],
'contentMatchType': 'video'
}
}]
}
Once the AssetMatchPolicy is in place, you will need to upload a reference file. I don't know your exact use case, but for me, the reference was just the same mov file I used to create the initial youtube video. The AssetMatchPolicy uses this reference file for enforcing your policy rules.
After you've done all of that you can continue with creating the claim and pushing the video out to the public channel.

Related

YouTube data API change video id

I need to change video I'd, so the URL got changed. Is it possible? As far as I can see from docs - its not supported... So is there any other way to change video URL programmatically?
Example:
When I uploaded video i received URL: youtube.com/watch?v=EMSGJdnDN8U Now (next day) I want to keep uploaded video on server, but i don't want URL youtube.com/watch?v=EMSGJdnDN8U to be available anymore, but the original video should be available on youtube.com/watch?=nEwUrL100500 (new url) and so on...
Of course I know that i can reupload video and delete original one but i dont like that solution.
Sorry, I don’t think so. The video id is a very important identifier for YouTube and it’s very unlikely that they give you control over it.

YouTube Data API - How to get "Saved playlists" via API

I'm trying to get all of my playlists through YouTube Data API including the public playlist that I have created and playlists that I liked from YouTube.
The playlists that I have liked from YouTube are in separate section which call "Saved playlists".
I'm using
https://www.googleapis.com/youtube/v3/playlists?part=snippet&channelId={ChannelID}&maxResults=50&key={YOUR_API_KEY}
But I'm getting only the playlist that I have created.
How can I get the "Saved playlists"?
I cannot add a comment, so I'm writing as an answer. (I hope I'm not doing anything against Stackoverflow Terms of Service)
If you would like to retrieve a spesific Playlist, i.e. "Saved Playlist", you should remove the Channel ID from your request and add Playlist ID ...
For example;
GET https://www.googleapis.com/youtube/v3/playlists?part=snippet&id={PlaylistID}&maxResults=50&key={YOUR_API_KEY}
I hope it helps.
Unfortunately this endpoint only retrieves user created playlists, the ability to retrieve "Saved Playlists" it is not implemented yet.
As can be seen here:
https://code.google.com/p/gdata-issues/issues/detail?id=6836

Is there a way to tell if a content owner has sanctioned another user's upload?

Apparently when a video is uploaded to youtube by someone who does not own the video content, the content owner, having found out, has the option to allow the video to remain up in exchange for profiting from its ads.
Is there a way of restricting feed results to include only those videos which the content owner has "ok'd" in that way?
I don't suppose either
<media:restriction type='country' relationship='deny'>DE etc</media:restriction>
or
<yt:state name='restricted' reasonCode='limitedSyndication'>
is any indication?
My goal is to make sure I don't have any links to illegally uploaded content on my site.
You need to check if the video is a licenced content:
Indicates whether the video represents licensed content, which means that the content has been claimed by a YouTube content partner.
You can do so by doing videos->list call via setting id=VIDEO_ID and in the response check if contentDetails.licensedContent set to True.

Is it possible to set the content rating using the YouTube .NET API w/ Direct Upload?

If I'm upload some items that should have a content rating, how can I set that via the API?
Here's some tidbits of the code:
Dim newVideo As Video = Nothing
newVideo = New Video()
newVideo.Title = title
That's a part of it, can we set the rating ourselves within the API or is that functionality not there yet?
Also, if a video is blocked or flagged worldwide, do YouTube provide that in the upload successfully response, if a video uploads okay, I can get the ID, but can I also check to see if there's any complaints? I will ignore the Duplicate response for now. But I am more worried about the flagged or block as you only get three strikes.
Setting content rating isn't supported via the API.
If a video is not playable for any reason, including the reasons you mention, it will have an explanation of the problem in yt:state:
https://developers.google.com/youtube/2.0/reference#youtube_data_api_tag_yt:state

YouTube API, Can I add a developer tag to an uploaded video?

My youtube videos have no developer tag and now I want to add one for them
I can get the videoEntry for those videos
I can add new developer tag as new MediaCategory
I can add MediaCategory as new Category to my video entry (displayed fine)
After I called VideoEntry.update() and use my own function to display the developer tag, it shows me the video has no dev tag. The function is working since I tested with my newly uploaded video(with dev tag during uploaing process)
My question is, Is it possible to add a developer tag after a video had been uploaded.
If possible, What's the essential steps? Do I use VideoEntry.update() ?
I currently have the same problem. According to this, you cannot add developer tags after the video has been uploaded. I do not know why Youtube has this restriction.

Resources