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?
Related
My app follows the server side authorization flow as described in https://developers.google.com/youtube/v3/guides/auth/server-side-web-apps. I force prompt=select_account.
In the most basic case, on "Step 3: Google prompts user for consent", the user sees a screen with one or more accounts titled "Choose an account". If the account that the user chooses only has a single channel associated with it, the flow then proceeds directly to "Step 4: Handle the OAuth 2.0 server response".
If the user has many channels associated with the account then the user might see another screen titled "Choose your account or a brand account".
For me personally I have two Google accounts: personal and work account and I see them both on the "Choose an account" screen. If I choose my personal account, I get directly to the app. If I choose my work account I see the additional screen where I can choose my "personal" work YouTube channel/account or the company wide shared channel/account. In total I can manage and access 3 YouTube channels/accounts.
The problem is that some users don't see all of their channels listed in the "Choose your account or a brand account". If the users are logged in to YouTube at the same time, they can still access all of their channels from the top right corner account selector on YouTube, but they can't see them at all in the selector. I've tried calling YT API channels.list in these kinds of cases but it doesn't return the missing channels, only the one the user picked from the selector.
It feels like I'm missing something obvious here, but since I don't have much control over the OAuth flow, I'm not sure how to go about fixing this. Is this even a problem on my end or do I just need to instruct the users to do something on their end?
Possibly related things:
YouTube APIs - Access mutiple youtube channels (Brand Accounts) using Google Admin account
YouTube API v3 get all channels associated with a logged in user
Youtube Brand Manager API V3 Support
Content owner "umbrella" accounts https://support.google.com/youtube/answer/6301188
default channel https://support.google.com/youtube/answer/6019090?hl=en
https://youtube-eng.googleblog.com/2013/06/google-page-identities-and-youtube-api_24.html
"Default channel with main account authorization" https://issuetracker.google.com/issues/35177410
It could be that the unlisted accounts are accounts that the users are not owners of but just managers for and where the flag onBehalfOfContentOwner is not set.
In the channels.list API there are the parameters
managedByMe boolean
This parameter can only be used in a properly
authorized request. Note: This parameter is intended exclusively for
YouTube content partners.
Set this parameter's value to true to instruct the API to only return
channels managed by the content owner that the onBehalfOfContentOwner
parameter specifies. The user must be authenticated as a CMS account
linked to the specified content owner and onBehalfOfContentOwner must
be provided.
and
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.
I have a youtube channel, CNLohr, http://youtube.com/cnlohr which I use as my primary livestreaming platform. It is distinct from my primary gmail account. My gmail account has its own youtube, but I don't have subscribers or anything on that. CNLohr is a "Brand manager"
My problem is that when authorizing an API application it seems to only apply to my gmail account account. Even if I authorize it as my youtube brand. It's very confusing as I can select my youtube or email account when at youtube but I cannot when visiting the API pages.
For example, if I visit https://developers.google.com/youtube/v3/live/docs/liveChatMessages/list and attempt to use the "Try this API feature" it works flawlessly with my email account - however - there seems to be no way to log onto that site as "CNLohr." When I click the icon up to, it only shows my gmail account and does not show my youtube account as an option.
No matter what I try I can't seem to get livestream or live stream chat IDs from my brand manager account, though it's trivial via my normal gmail account.
How should I proceed if I wish to use the youtube API with my primary 24k subscriber account?
(Scratched out just so no image screevers get my email, it's okay for you guys to know it!)
This issue has been resolved by youtube as of Jan, 2018. Brands are now first-class citizens, and can perform the oauth as expected.
Is it possible to get all the channels associated with a logged in user account, using youtube's version 3 API (https://developers.google.com/apis-explorer/#p/youtube/v3/).
The nearest call that I can see for YouTube.channels.list
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list
I attempt to use this by 'Authorizing the requests using OAuth 2.0' I select part=snippet and mine=true
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list?part=snippet&mine=true&_h=1&
but this only brings back the single channel not any of the other channels associated with the account, but the account I'm using has several channels. I need to get all channels for logged in user so I can give them the choice of what channel they are using, especially now google have messed YouTube around with the Google plus integration.
Does anybody know if this is possible?
Found the answer in YouTube's API Blog here:
http://apiblog.youtube.com/2013/06/google-page-identities-and-youtube-api.html
According to this as I'm using Android with OAuth2 there is no native Android account switcher, and
the then the API will choose the “wrong” channel in some cases, or
even no channel (e.g., if the personal account doesn’t have a
channel).
So I've got two options When this happens, the user has two options to specify the correct channel:
Use the Advanced Account Settings tool to select which channel should
be used. This is recommended when a user has one channel they want to
use for all applications.
Set up login credentials for each of their Google+ pages, and specify those > credentials, not their normal Google Account
credentials, for each application that needs access.
Both these options require the user to do something outside the boundary of the Android Application, so both solutions are not usable. Unfortunatly this piece of functionality will have to wait until Android has some better way of switching the channel for the user...
OAuth2 allows login in with only one channel, so that's not possible.
OAuth2 already gives user a choice to pick the channel they want to authorize and give access, so you don't have to implement it anyways.
I manage several Youtube channels, each with their Gmail account and now also associated with a Google+ account.
My question is: I can access, via Youtube Analytics API, to all my Youtube channels reports with a single Google account without having to choose between them? That is, a general account with permissions to access reports on all channels.
Thanks in advance.
Yes, you actually can have these different channels linked under a single Google account.
1) Set up a Google Plus Page for your YouTube account via https://www.youtube.com/account (requires g+ account) Note: This may overwrite avatar and channel title, and may change your YouTube display name to whatever you set your Page Title to be.
2) Your personal g+ account will be the owner of this Google plus page.
3) Repeat for other accounts, setting up their own google plus pages.
4) You can add your main personal g+ account (if you have one for each unique gmail) as a "manager" of these other pages, giving a single login access to the pages (and therefore all the associated YouTube accounts) via the drop down "switch acocunts" on YouTube (top right drop down)
5) After a page is old enough (2 weeks?) you can change owners so your main g+ page owns the page. Not necessary but helps consolidate + lets you abandon other personal g+ accounts.
Let me know if you're able to follow that. There are benefits to doing this with only a single channel. You won't be able to see "combined" analytics but you can switch accounts much, much easier.
This link provides the youtube channel report in range. But when used with google php library it get hooked in a "User login required Error!"
https://developers.google.com/apis-explorer/#p/youtubeAnalytics/v1/youtubeAnalytics.reports.query?ids=channel%253D%253DMINE&start-date=2014-05-01&end-date=2014-06-30&metrics=views&dimensions=day&_h=3&
Is there any way i can access the channel analytics report in youtube V3 same as like in v3
http://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list?part=statistics&id=UCMGgBRBiijmpgL3xNuiDVOQ&_h=10&
I've got a client who is a business. They are using Google Apps for Business (the paid version), and have created a Google Apps email account. Using this email account, we logged into YouTube and went to create a channel. Because they are a business, we created a BUSINESS YouTube Channel with the associated BUSINESS Google+ Page.
They also have a vendor who is using the YouTube API to upload their videos for them. However when the vendor tries to use the API, they get the error "no linked youtube account". We're thinking that this is because as a Google+ Business Page, the page is not associated with a single Google Account, but rather multiple Google Accounts can be set as "managers" of the page.
When we tried to create a "personal" YouTube Channel/Google+ Page associated with this email address, we tried to put the company name in as the First Name / Last Name and it rejected it because it says that it's a company name and not a real person's name. It also asks for gender and birthdate, and all of those things associated with a person and not a business.
My questions is.... is there a way around this issue? Can you use the YouTube API to upload with a Google+ Business Page and a YouTube Business Channel?
Thanks,
Justin
You should be able to create a Google+ Page and a corresponding YouTube account. Here's a blog post explaining the steps.
To clarify this example, I have a Google+ page (somewhat inactive) for Cloud Hulk, a joke name my old teammates gave me. When I go to the top right corner of YouTube.com, I can select "switch account"
Now when I click on it, the very first time I do it, it asks me to create a channel. If I do not do this step, the YouTube API will return a "no linked YouTube account" error. I confirm the change:
Now that I'm logged in, I should see this in the top corner of YouTube.com:
When I'm doing the OAuth 2.0 authorization flow, I'll be presented with a list of channels to authorize as:
You can test this out by going to the API reference and clicking on "Authorize Requests Using OAuth 2.0" under "Try it Now".