How to list all the videos in a youtube channel using android studio.

You don’t have to copy the entire sample code ,just call this link to get channels.
https://www.googleapis.com/youtube/v3/videoCategories?part=snippet&hl=en&regionCode=US&key={YOUR KEY}
You will get a json response with all the channels or videocategories available.
Parse the response and you will get a “categoryId” from the response.

Then call this link to get the videolist for a particular categoryId
https://www.googleapis.com/youtube/v3/videos?chart=mostPopular&part=snippet&type=video&videoCategoryId={a categoryId got from previous response }&maxResults=20&key={YOUR KEY}

parse the response.that’s all.

Leave a Comment