Derek Carlson
Derek Carlson

Reputation: 51

Enable Content ID Matches via YouTube Partner API

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.

Upvotes: 1

Views: 1636

Answers (1)

oolong
oolong

Reputation: 675

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.

Upvotes: 2

Related Questions