9

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.

  1. Is the connection to cms.youtube.com neccessay to pull contentOwner reports which are shown on youtube analytics?
  2. Does a user have to provide OWNER_NAME ( or ContentOwner_ID ? ) by himself, or can I pull it somehow?

Authorization grants access to the yt-analytics-monetary.readonly, yt-analytics.readonly, youtubepartner and few others.

Jeff Posnick
  • 53,580
  • 14
  • 141
  • 167

1 Answers1

9

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.

Jeff Posnick
  • 53,580
  • 14
  • 141
  • 167
  • Could you elaborate a little bit. Eg, what is the URL, is it GET or POST, what are the required params/body? I'd like to get contentOwnerID for `mine=true`. – if __name__ is None Oct 24 '13 at 15:37
  • 1
    Thanks for the details on `onBehalfOfContentOwner`. I'm not finding much info at all on the youtubepartner scope and what we can do with it. We run a small MCN and are looking for more info on this. Any suggestions? Also, are the youtubepartner capabilities exposed in the client libraries, or do we have to build and issue direct calls? I couldn't find anything in the PHP client library for getting the `contentOwners` list, for example. – Josh K Oct 22 '14 at 03:32
  • @JanNetherdrake are you still looking for the URL/params for this call? – Daniel Sep 01 '15 at 20:13
  • @Daniel, no, as it seems to be only available to MCN's. – if __name__ is None Sep 08 '15 at 22:19
  • 1
    @Daniel I'm still looking for parameters for this call, how I can make this request? To be more specific, i don't get how to use "youtubePartner.contentOwners.list(fetchMine=true)" Also, what youtubePartner means? – maxdelia Apr 04 '16 at 12:33
  • If someone is still looking for the URL for this endpoint I believe Jeff were talking about this one: https://developers.google.com/youtube/partner/docs/v1/contentOwners/list I've found it somehow tricky to find – Jan Matuszewski Apr 08 '21 at 09:17