Bar Shema
Bar Shema

Reputation: 3

How to get list of playlists in channel on youtube-api without OAuth2?

Can I get playlists from a channel without using authentication (OAuth2)?

I found this: https://developers.google.com/youtube/v3/docs/channels/list#usage. But it seem I have to use OAuth2, Which I think is redundant because it's not a private information.

I need this in JavaScript.

Upvotes: 0

Views: 99

Answers (1)

BugHunter
BugHunter

Reputation: 1204

you can use jQuery to get playlists of a particular channel, you need an API key.

$.ajax({
 type: "GET", 
 url:'https://content.googleapis.com/youtube/v3/playlists',
 dataType: 'jsonp',
 data: {'channelId': 'CHANNEL_ID',
                 'maxResults': '25',
                 'part': 'snippet,contentDetails', 
                 'key': "YOUR_API_KEY"},
   success: function(response){
  // handle response
}

});

Upvotes: 1

Related Questions