YouTube API v3: Get all Channels and PlayLists for given User-name
<p>How do I use YouTube JavaScript API v3 so that I can get ALL channels as well as all playlists for a given user name, as JSON, etc?</p>

<p>I used following references</p>

<ul>
<li><a href="https://developers.google.com/youtube/v3/docs/channels/list" rel="nofollow noreferrer">https://developers.google.com/youtube/v3/docs/channels/list</a></li>
<li><a href="https://developers.google.com/youtube/v3/docs/playlists/list" rel="nofollow noreferrer">https://developers.google.com/youtube/v3/docs/playlists/list</a></li>
</ul>

<p><a href="https://stackoverflow.com/a/18767785/799593">https://stackoverflow.com/a/18767785/799593</a> does not seem to be working anymore.</p>

<p><strong><a href="https://support.google.com/youtube/answer/3027950?hl=en" rel="nofollow noreferrer"> ==> Channels</a></strong></p>

<p>Below is my code, calling the channel end-point. It basically performs HTTP GET operation using AngularJS, where "id" is the ChannelID, being passed by "query" parameter.</p>

<pre><code>var getUrl = 'https://www.googleapis.com/youtube/v3/channels';
this.get = function (apiKey, query) {
    var parameters = {
        kind: 'youtube#channel',
        part: 'contentDetails',
        id: query,
        maxResults: 3,
        key: apiKey
    }
    return $http({
        url: getUrl,
        method: 'GET',
        params: parameters
    })
};
</code></pre>

<p>This query basically can only return the IDs for Uploaded Videos and Liked Videos for a given YouTube channel. Instead, I am looking to get a list of all Channels, for a given user.</p>

<p>I also tried following:</p>

<pre><code>this.getByUserName = function (apiKey, query) {
var parameters = {
    kind: 'youtube#channel',
    part: 'contentDetails',
    forUsername: query,
    maxResults: 5,
    key: apiKey
}
return $http({
    url: getUrl,
    method: 'GET',
    params: parameters
})
</code></pre>

<p>};</p>

<p>But it only seem to return the "main channel", in other words, if I query with forUsername="Google", I get <a href="https://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA" rel="nofollow noreferrer">UCK8sQmJBp8GCxrOtXWBpyEA</a> ... so in contradiction to my interpretation in the "mind-map" below, the correct hierarchy might be actually linking only one channel for each user account and such channel can have multiple playlists. But this actually does look confusing and over-thinked approach from Google/YouTube.</p>

<p>e.g. if user passes "Google" then the API would reply with all channels we see on <a href="https://www.youtube.com/user/Google/channels" rel="nofollow noreferrer">https://www.youtube.com/user/Google/channels</a></p>

<p><strong><a href="https://support.google.com/youtube/answer/6014768?hl=en" rel="nofollow noreferrer"> ==> Playlists</a></strong></p>

<p>This looked relatively straight forward but the API basically seem to be limited to a comma separated list of YouTube playlist IDs, but the question is how to get them in first place, given a UserID?</p>

<p>I am interested to get results equivalent to: <a href="https://www.youtube.com/user/__UserID__/playlists" rel="nofollow noreferrer">https://www.youtube.com/user/<strong>UserID</strong>/playlists</a> but following is what I have as of now.</p>

<pre><code>var getUrl = 'https://www.googleapis.com/youtube/v3/playlists';
this.get = function (apiKey, query) {
    var parameters = {
        kind: 'youtube#playlist',
        part: 'contentDetails',
        id: query,
        maxResults: 10,
        pageToken: '',
        key: apiKey
    }
    return $http({
        url: getUrl,
        method: 'GET',
        params: parameters
    })
};
</code></pre>

<p><em>I'd conclude my question with this "mind-map" of YouTube's hierarchy and with annotated example of Google with links. I am not sure if this is the correct representation, but I believe if I know the correct hierarchy it might give me a hint as to how to I get YouTube Channels and PlayLists for a given user using YouTube JavaScript API v3.</em></p>

<p><a href="https://i.stack.imgur.com/hMZ00.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hMZ00.png" alt="http://i.imgur.com/GWoZvCE.png"></a>
(Full size image at: <a href="https://i.imgur.com/GWoZvCE.png" rel="nofollow noreferrer">http://i.imgur.com/GWoZvCE.png</a>)</p>