2
votes

Good afternoon,

I am running into issues when trying to issue content owner report queries with the YouTube analytics API. I have authenticated as an application and been given permission by a content owner (who is a YouTube partner) to access their YouTube analytic data but receive a 403 (forbidden) response from issuing the query. I am able to run channel reports on the user in the same OAUTH2 session without issue. I am uncertain about some aspects of the content owner privileges with the app and was hoping someone could clarify my questions:

1) Can applications access content owner reports of partner users with the yt-analytics.readonly OAUTH scope or is there an additional scope necessary?

2) Is there a way for an application to be associated with a partner account itself so that it can retrieve content owner reports on behalf of non-partner users?

3) If I have several YouTube channels registered in my CMS, is it possible to query across all channels in a single OAUTH session?

Below is one of the content owner requests that is failing (without the access token or user id) - in case the information is useful. Thank you for your help!

Regards,

David

GET https://www.googleapis.comyoutube/analytics/v1/reports?access_token=myAccessToken&start-date=1970-01-01&end-date=2012-11-01&ids=contentOwner==contentOwnerUserID&metrics=views&filters=claimedStatus==claimed

1

1 Answers

0
votes

Regarding your specific questions:

  1. The YT Analytics read-only scope should be sufficient for running both content owner and "normal" YT Analytics reports. There's no special content owner scope.
  2. I'm not sure what you're asking here. The permissions that you have depend entirely on the account you use when granting access via OAuth 2. This is not specific to an application, per se.
  3. If there are several channels with content associated with a single content owner "parent" then going through the OAuth 2 flow with the credentials of that "parent" should be sufficient to get OAuth 2 tokens that will work when running reports against videos in any of those channels.

It's hard for me to debug the specific issue that you're running into without knowing at least the contentOwnerUserID value (and ideally knowing the email address of the content owner account that went through the OAuth 2 flow). If you don't feel comfortable posting that on Stack Overflow, reach out to me directly and I'll follow up here with the solution.