How Can I Use YouTube Data API to Upload Videos to a YouTube Channel I Have Access To?

This topic was automatically generated from Slack. You can find the original thread here.

Any idea how to use YouTube data API for youtube accounts I have access to? I have been granted admin permissions on somebody else’s youtube channel to upload videos there, however when I connect my youtube account to pipedream, I can only post videos to my account, not the account I have access to. Any idea how to solve this?

Hi , may I ask in the OAuth pop up to Choose an account (as image below), did you select the account that you has the admin permissions? If not, could you try to reconnect a new account?

Correct I used the account that has admin permissions.

I see. I have just tested on my side with 2 accounts and I can create playlist on those account respectively.

Would you mind confirming that in your Youtube action, you have chosen the correct account? Would you mind sharing the screenshot of your Youtube API accounts as the images below?

Wait, have you connected YouTube API for two different accounts that are mentioned here separately, or you just connected one YouTube API account, and because the account that you connected had access to other youtube account, it showed up here in the youtube step in the workflow?

I think you should connect to 2 different accounts in stead of one account

then that means I need to have credentials of the youtube account I have admin access to.

which I don’t need, if I am uploading videos on that account on youtube directly

Is that correct?

Yes I think so. Connecting into the another account the simpliest way for now. You can ask the account owner for the credentials.

If you can find a Youtube documentation that support single account with different channels. Please submit a ticket for Pipedream to improve :pray:

ok thanks

I find the same problem for other platforms too. For example, I have admin access to couple of linkedin pages that are not created by me. I can post them on linkedin directly, but if I connect to my account from pipedream, I don’t see any way to post to those pages.

however, the same problem is non-existent for AirTable. I have admin access to several other airtable accounts, and I can post or use data from those accounts.

I think it is depending on those service APIs. Pipedream is using APIs from those services, and only if their API have the functionality to do cross-account operations then Pipedream will be able to use it.

On Youtube API doc, I see that it have the onBehalfOfContentOwner and onBehalfOfContentOwnerChannel parameters that might fit your needs. Could you read the description below if it is relevant for your usecase?

onBehalfOfContentOwner: string
This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.

The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. 

onBehalfOfContentOwnerChannel: string
This parameter can only be used in a properly authorized request. This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.

The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.

This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.

Thanks. let me check this. However, I definitely know that it is possible for linkedin, it’s possible to post to connected pages through APIs. I use make.com for many of my workflows, and it’s possible there.

> I definitely know that it is possible for linkedin, it’s possible to post to connected pages through APIs
Thank you for your information ! It would be great if you can submit us a ticket to enhance Pipedream Linkedin action of your usecase :pray:

will do. Thanks a lot.