Our company has multiple incoming live feeds to hardware encoders. My app allows the content managers to stream those feeds to our web site as well as social channels, including YouTube. Our app stores long-lived refresh tokens for YouTube accounts and uses those for authorization. We would like to add asset ownership and monetization for YouTube targets. Here are the steps we are taking:
- Create a Broadcast
- Find or create a Stream
- Bind Broadcast to Stream
- Publish Broadcast
- Unpublish Broadcast
This all works fine within our app. The first step for adding asset ownership and monetization, as I understand it, is to create an Asset object (according to this doc: https://developers.google.com/youtube/partner/reference/rest/v1/assets/insert), which I am doing between steps 1 and 2 with a request body of:
{ kind: 'youtubePartner#asset', type: 'episode', metadata: { customId: event.id, title: youTube.broadcast.snippet.title description: youTube.broadcast.snippet.description }}But this request always responds with a generic 403: Forbidden. I have confirmed that the refresh token is generated for the https://www.googleapis.com/auth/youtubepartner scope, and I assume that I do not need onBehalfOfContentOwner when using a long-lived access token (this is the case for all the other successful API calls I have made, and including it does not change the response).
Is there some other aspect to authentication/authorization for Partner API endpoints (or just this one) that I am missing?