0
votes

Having a youtube partner account, I need to programmaticly set the 'usage policy' of the monetization section.

When I update this field from the youtube interface for my video, I can see that the contentDetails/regionRestriction have been correctly updated.

But when I programmaticly call the update YouTube Data API v3, setting the contentDetails/regionRestriction seems to have no effect.

Which API should I call in order to programmaticly update this field (contentDetails/regionRestriction)?

1
Can you post show your code? and also the error code received?Android Enthusiast
Hello, I think code won't be useful here. I use the API developers.google.com/youtube/v3/docs/videos/update correctly since I am able to update snippet informations (like the title). But if I try to update the contentDetails, there is no error but the contentDetails section is not updated . I actually think this is not the right API to use to make 'usage policy' update.Vince

1 Answers

0
votes

Actually the process is a little bit more complicated than that.

You cannot directly set these values using the upload API.

After the upload, you have to use a contentManager account to create a policy (or use a default one) , create an asset and set the ownership of the asset. This is where you can set the restrictionRegion section. After that, you have to claim the uploaded content with your video id, policy id and asset id.