How to tell if channel is a YouTube Partner from the API? - youtube-api

There are a few features listed ( such as custom thumbnails ) in the YouTube API that require a channel to be in the YouTube Partner program. Does anyone know of a way to determine if a channel is in the partner program from an api call?
I thought of doing a call to a feature such as branding that requires the partner program and catching an error code, but that seems inefficient.

The way i've doing is:
Getting the URL of the latest video of the channel and parse the html code getting the tag above:
<meta name="attribution" content="NETWORKNAME"/>
If the content don't have "%2user" on that string, the channel have a network, and network name is that.
Would be nice if we had these data in the Youtube API.

Related

Getting access to YouTube Content ID API

My original purpose is to get all of the channels that a user manages. I found a code snippet that does exactly that: https://developers.google.com/youtube/partner/code_samples/python#retrieve_a_content_owner_s_managed_channels
However, it seems to rely on the YouTube Content ID API, when I run it I get the following error:
YouTube Content ID API has not been used in project ... before or it is disabled.
However, the YouTube Content ID API doesn't show in the projects console. I manage several YouTube channels, and one of them is part of the YouTube Partner Program. So, my question is, how do I get access to the YouTube Content ID API?
I've been reading about this for several hours and found several conflicting statements.
Here, saying:
As a YouTube partner, you can use the API...
Here, saying:
in order to be able to access the ContentID API, you have to be part of
the ContentID Partner Program, not the YouTube Partner Program.
However, you're not likely going to have ContentID access if you don't have major copyright management control issues
Which is weird, since the data I need has nothing to do which copyrights at all, so why would I need an API that relates to that to get it?
Here, saying:
You don't see it in the list auf available APIs, unless your account
is connected to a CMS and some time has past... It takes 7-14 days
unless the Content ID API is available for your account. This is a
information i got from the support, but they told me, that it is an
automated step.
So, which one is it? If I'm only part of the YouTube Partner Program, should I just wait for 2 weeks until the API shows up in my console?
Or does it actually require to be in the ContentID Partner Program (which is not the case here)?

YouTube Data API returns channel for user without channel

I've got a YouTube user, which doesn't contain a YouTube channel. But the YouTube data API does return a channel, if I query the youtube.channels.list API method by using the "mine=true" attribute like in following example (1).
Example:
(1) Returns a channel (mine=true; by using OAuth):
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list?part=snippet%252CcontentDetails%252Cstatistics&mine=true&_h=5&
This query (1) returns a channel which contains a channelId. Now I'm trying to query for the playlists of this channel by using the previously returned channelId.
(2) Returns a 404 "channel not found" error
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.playlists.list?part=snippet&channelId=UCIReEy02ibumfYhQP3-0drQ&_h=4&
As described here it's possible to use a YouTube account without a channel but with limited functionality like using playlists:
With a Google Account, you can watch and like videos and subscribe to channels. However, without a YouTube channel, you have no public presence on YouTube. Even if you have a Google Account, you need to create a YouTube channel to upload videos, comment, or make playlists. You can use a computer or the YouTube mobile site to create a new channel.
What's the reason query (1) is returning a channel even if a YouTube account doesn't contain a channel?
BR
ninsky
[1] Returns a channel (mine=true; by using OAuth):
Because of every account on youtube itself a channel. They can do all the things they want like any channel can do e.g. upload videos. Also, we can make multiple channels under the same account.
[2] Doesn't return a channel (forUsername=UCIReEy02ibumfYhQP3-0drQ; by/without using OAuth):
Please make sure UCIReEy02ibumfYhQP3-0drQ is a valid username
I'm building something with the YouTube API. I've found a few oddities so far. The first thing is that a channel can have a title of 'blah blah - Topic' so you probably want to screen those out if you want to retrieve channels with their own content. If I'm right in my thinking, these are just channels with Playlists. Example: https://www.youtube.com/channel/UC6tQSWkTxbPNaJ_LQ-Ia6jQ/
Also be aware that channels don't have to have a unique title.
Finally there are many channels that return nothing from the API Channels.List method, even though they are channels. I'm still figuring these out. I don't think they are returned from searching through the API, but if you get your Channel IDs from another source then this could be an issue.

Who to contact for YouTube Content ID API for the purpose of developing new web tools?

I am aware of the partnership program in order to gain access to the YouTube Content ID API, but I'm not interested in monetization. I'd like to work with the API to develop a web tool. Is there any way to do this? I'm having a hard time trying to contact YouTube about it. Any help would be appreciated.
You can contact them through here.
The YouTube Content ID API is intended for use by YouTube content
partners and is not accessible to all developers or to all YouTube
users. If you do not see the YouTube Content ID API as one of the
services listed in the Google Developers Console, see
www.youtube.com/partner to learn more about the YouTube Partner
Program.

Does Youtube Data API Sanitize Results

I used YouTube Data API a bit. My page does display users input from Google's servers eg video title. Would you be able to get an XSS by putting to code on Youtube and calling in back on my domain.
YouTube does not allow tags to be created so XSS over an API is no worry.
Sorry don't uses YouTube upload that much

How to use the Youtube Analytics API to get the metric "earnings"?

I am a Youtube Partner and I have monetized videos on Youtube. Already receive a small monthly amount through some channels that have associated with my Google Adsense account.
Now, I would like to generate a report gathering the monetary values and views received from each channel.
I did the following question on Google Code, because I thought there was some problem in the API, but it happened that I was using the API incorrectly. See the link below.
http://code.google.com/p/gdata-issues/issues/detail?id=4826#makechanges
Now, I still could not make it work because I do not know where to find the requested data in the response I got from the link above.
Where do I find this CMS_ID? I have more than one channel, so I need to have each accepted as a Youtube Content Manager to use the API and retrieve the gains?
Someone here on Stack Overflow already managed to use the Youtube Analytics API using the metric "earnings"?
My code is in Python based on the example from Google here:
https://developers.google.com/youtube/analytics/v1/code_samples/python
I'm using the following scopes:
YOUTUBE_SCOPES = ["https://www.googleapis.com/auth/youtube.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly",
"https://www.googleapis.com/auth/youtubepartner",
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly"]
As of right now, it's only possible to retrieve monetary information in YouTube Analytics API reports when those reports are run via the context of a content owner, as described in the documentation.
It is possible to have a monetized channel that is opted in for Google AdSense ads without having that channel managed by a content owner, in which case you would not be able to get those metrics via the YouTube Analytics API.
Let's use the issue you previously opened to track the request to open up this type of report to non-content owners as well, as that's a more appropriate place for feature requests than Stack Overflow.

Resources