Good afternoon
I've created an app that is pulling data from YouTube Analytics API. My task is to get contentOwner monetary reports, and for that I need an OWNER_NAME which is an issue for me. I have test YouTube account that have monetary reports on it but its not connected to a youTube CMS.
Authorization grants access to the yt-analytics-monetary.readonly, yt-analytics.readonly, youtubepartner and few others.
To retrieve a content owner report, call the API's reports. query method and set the ids parameter value in the API request to contentOwner==OWNER_NAME , where OWNER_NAME specifies the content owner's ID. Ask your partner manager if you are unsure of the value.
The content owner is the person or organization that claims videos and sets their monetization policy. A content owner has one or more channels associated with it, and one or more YouTube users who are designated as administrators.
Assuming you have an OAuth 2 token with access to the https://www.googleapis.com/auth/youtubepartner
scope, you can make an API call to youtubePartner.contentOwners.list(fetchMine=true)
to get back a list of YouTube content owners associated with the current OAuth 2 token. (There will normally only be one item returned.) You can then get the content owner id value from the id
property of each item in the items
list that's returned. This is the value that you can use when making content owner YouTube Analytics API reports, or using the onBehalfOfContentOwner
delegation parameter in the YouTube Data API v3.
If you don't have access to the https://www.googleapis.com/auth/youtubepartner
scope but you still want to write code that requests YouTube Analytics API content owner reports, you need to ask the content partner you're working with to tell you their content owner id.
I'd link to the documentation, but it's currently not exposed publicly. This is a common enough question that I thought it should be answered, though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With