1
votes

I'm trying to upload videos to multiple channels via the Youtube Data API v3.

I can do it properly when uploading videos to the main default channel, however I can't when we try to upload them into a different channel which is part of the same Youtube account (so the OAuth2 credentials should be valid).

According to the docs, I've to pass to the API the following params: onBehalfOfContentOwnerChannel and onBehalfOfContentOwner when calling the endpoint: /youtube/v3/video/insert

The point is we don't have a clear idea about what is the onBehalfOfContentOwner value is. Is it the main email address associated to the owner? How we can obtain it? Is it required or not? Isn't enough passing only the target channel ID when uploading?

By the other hand, I created multiple channels from the Youtube CMS for partners, but I'm not able to retrieve them when calling the API via: youtube/v3/channels?part=contentDetails&mine=true I can only see one unique channel (the main one).

1

1 Answers

0
votes

You provide your CMS auth credentials in onBehalfOfContentOwner, which can only be used in a properly authorized request.

Note that since you've created channels for different partners, the request must be authorized using the CMS account that is linked to the content owner specified inonBehalfOfContentOwner. Lastly, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner (YouTube channel ID of the channel to which a video is being added) parameter specifies.

If you are using Google+ to manage all those accounts, read here for more information. If you are a content owner who manages all of the channels, you can use the Content ID API.