How to get income reports from a YouTube CMS account using the API (for MCN)?

I have access to a YouTube CMS account (for MCN). I can do many, many things on YouTube, and this also includes uploading CSV reports containing detailed income information.

However, I want to do some automatic processing of this data and thus access the data using the API instead of manually loading the CSV. It seems that the YouTube Analytics content owner reports should also contain this data, so I tried to get some data from this API (currently only the Explorer API is used ), but the only thing I could get was a โ€œForbiddenโ€ response.

The API tells me that I need to specify contentOwner == OWNER_NAME for the CMS account, but it doesnโ€™t explain what OWNER_NAME is anywhere. I tried just pasting the display name of my CMS account, replacing the spaces with underscores, but not succeeding. How do I know what the name of my owner is?

In addition, when I authenticate using OAuth, I get, as usual, a list of accounts in which I can choose which one to use (for example, all the YouTube channels that I am the manager), but no CMS account is specified. However, if I go to YouTube, I can click on the upper right corner and then switch to CMS. I donโ€™t know if this is important ...

And again, maybe I'm completely mistaken, because I want to receive reports for all channels connected to my MCN, but this does not mean that I own the content. So maybe I'm not the owner of the content? In this case: What is the correct way to request reports from the API?

+4
source share
1 answer

First of all, the CMS account is not a separate account with which you can log in through an oath. This is more like a privilege and is associated with one of your google / youtube accounts. This differs from the usual youtube channel management, where each channel has its own login credentials.

Youtube Account Selector

youtube account-selector-view, CMS name@email.com, , oauth CMS.

, CMS, "CMSName". , , contentOwner == CMSName. CMS, , . , - , _ , "" %20" .

, , . :

, - 403 , . API YouTube https://developers.google.com/youtube/partner/.

: API , API, . :

Note: The YouTube Content ID API is intended for use by YouTube content partners and is not accessible to all developers or to all YouTube users. If you do not see the YouTube Content ID API as one of the services listed in the Google Developers Console, see www.youtube.com/partner to learn more about the YouTube Partner Program.

API, CMS, - ... 7-14 , API- Content ID. , , , .

, , API Content ID.

contentOwnerShips, . API- https://developers.google.com/youtube/partner/docs/v1/contentOwners/list#try-it param fetchMine = true https://www.googleapis.com/auth/youtubepartner-content-owner-readonly. :

{ "kind": "youtubePartner#contentOwnerList", "items": [ { "kind": "youtubePartner#contentOwner", "id": "[CMS_ID]", "displayName": "[DisplayName]", "primaryNotificationEmails": [ "mail@random.xx" ], "conflictNotificationEmail": "mail@random.xx", "disputeNotificationEmails": [ "mail@random.xx" ], "fingerprintReportNotificationEmails": [ "mail@random.xx" ] } ] }

CMS_ID, API onBehalfOfContentOwner.

, ,

        "https://www.googleapis.com/youtube/v3/channels?part=contentDetails&managedByMe=true&onBehalfOfContentOwner=[CONTENTOWNER]&access_token=[ACCESS_TOKEN]"

"https://www.googleapis.com/auth/youtubepartner ".

, .

+4

All Articles