0
votes

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

2

2 Answers

0
votes

[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

0
votes

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.