Create API key for YouTube channel, where I am not owner - youtube-api

I do have a Google account. I was invited in other YouTube channel with Manager role.
Is it possible to create an API key for working with this channel without being its owner.
The goal is to upload videos on that YouTube channel without having the owner's credentials.

Related

(Q&A) Can YouTube manager use YouTube API to modify channel content

I am handling well known YouTube channel (and verified YT channel). They sent me invite on my Gmail to be the manager for the channel. My query is 'they made channel manager. So, Do I have rights to use API(with OAuth) to modify the channel content. (I have access the content page and analytics except for revenue section).

How to relate a Youtube Channel and its Google account after deprecation of "googlePlusUserId"?

The "googlePlusUserId" of the YouTube channel object has been deprecated in the last review of the Youtube Data API (June 13, 2016). From the YouTube Data API revision history:
The channel resource's contentDetails.googlePlusUserId property has been deprecated. Previously, the property was only present if the channel was associated with a Google+ profile. Following the deprecation, the property will no longer be included in any channel resources.
I was using this property to relate a YouTube channel with its Google account. By this way I was able to verify in my page that a user signed in with Google is the owner of a YouTube channel. So how to do it now without this property?
Use case
My use case is a web application which invites some YouTube Channels (users) to the website. Ideally this invitation must be with a direct email to the email of the user or a direct message to the YouTube Channel through the YouTube Data API. However, both options are not viable because it is impossible to retrieve the email and actually there is not a functionality to send direct messages to a YouTube Channel through the API. So to invite a YouTube channel we have to manually go to the YouTube Channel about page and send a message to the user with the link to join our page. This link is an URL with a token identifying this invite but we need to be sure that the user coming from this link is the owner of the YouTube channel which has been invited, so the only way is logging in with his YouTube channel account which is the Google account.
I hope I have explained it well, if you have any doubt ask me.
Thank you!
I found a solution. You can make another call to people/me Google+ API endpoint to get the id of currently logged Google user.
Here you can find more information about OAuth scope you have to to grant to the token for access to user's data.

How to know `on_behalf_of_content_owner` for Youtube Analytics API?

I want to use list_batch_report_definitions method in Youtube Analytics API V2.
http://www.rubydoc.info/github/google/google-api-ruby-client/Google/Apis/YoutubeAnalyticsV1/YouTubeAnalyticsService#list_batch_report_definitions-instance_method
But I don't know what is on_behalf_of_content_owner and how to get it.
onBehalfOfContentOwner string
The ID of the content owner for whom the API request is being made. If the request does not specify a value for this parameter, the
API server assumes that the request is being made for the user's own
channel.
ID Identifies the YouTube channel or content owner for which you are >retrieving YouTube Analytics data.
Note: Content owner reports are only accessible to YouTube content partners who participate in the YouTube Partner Program.
I suspect once you have been accepted into this partner program you will be given access to the content owner id.

YouTube API to upload to Business Channel

Is there any way of using the YouTube API so that users can upload videos directly to my business YouTube channel? Users would grant permission to upload to my channel on the website. I want to avoid uploading to another server, then to YouTube if possible.
Thanks
You can use service account OAuth2 to authorize requests from your app on your behalf to a channel that your account is authorized to access/the owner of.
Create service account credentials: (documentation here)
and make sure the YouTube Data API v3 is enabled on your API
project (getting started guide here, if you're new to the API).
Use your service account OAuth credentials to call the upload API: (documentation here) use the auth in step 1 to upload the video your users share with you and specify your business YouTube channel ID in the video resource. Sample code in various languages here (just search for upload examples after you choose your preferred language).
Things to keep in mind:
If you enable uploads to your channel by end users but don't do any checking/validation there is potential for abuse
service account OAuth is valid for 1 year, so you'd need to refresh the service account credentials every year
It will look like these videos are being uploaded by your business channel and not other user's channels (because that's what's happening via the API).

YouTube API - List all channels that I manage

I have a YouTube channel for my personal account, and one for my business account. I have associated a Google+ page to both channels. In the business account, I have clicked "Managers" (in the drop down in the top right), and added my personal gmail account as a Manager. This has all worked fine.
Now, though, I am trying to use the YouTube API to list all of the channels that my personal account has rights to manage. I'm trying to use the Google Developer's page here https://developers.google.com/youtube/v3/docs/channels/list#try-it but it is only returning the one channel that is directly associated with my personal account. I'd expect it to return both the personal channel and the business channel.
Is there a way, an api call, or a setting that will allow me to make a single api call for an oauth user and see all of the YouTube channels / Google+ Pages that the user has permissions to manage?
I you are using the WebView for authentication, the user has to choose the YouTube account to be used. The channel will then be returned. If you are using Android OAuth, the only way to specify a channel is for the user to select the "default channel" in the advanced YouTube account settings.
http://youtube-eng.blogspot.de/2013/06/google-page-identities-and-youtube-api_24.html
I don't think that you can manage different accounts (even if they have linked to eachother) with the same API key. Sub-channels can be managed with the same API key with main channel. Which version of API are you using?

Resources