gillesberger_p
gillesberger_p

Reputation: 75

YouTube Data API receiving subscription feed

I have two questions concerning the YouTube Data API: First of all, how do I receive the user's subscription feed (https://www.youtube.com/feed/subscriptions). Secondly, when I set the parameter "publishedAfter" to e.g. 2016-09-18, earlier published videos are returned, too.

Thanks for your replies

Upvotes: 4

Views: 2366

Answers (1)

Kumar
Kumar

Reputation: 1217

Let me tell you your first question answer. Actually you cannot get subscription feed directly using api you can get a user subscription list by using

https://www.googleapis.com/youtube/v3/subscriptions?part=snippet&maxResults=50&mine=true&key={YOUR_API_KEY}

Then use the channelID to get its recent videos by the this xml feed.

https://www.youtube.com/feeds/videos.xml?channel_id={channelID}

But you need to make auth of that user to get his subscriptions feed. You can do it easily by youtube api sample script. There are some example to get access token and then use curl to get his feed.

Now for your second question.

I don't think you can get older feed from that channel. Hope it helps you.

Upvotes: 4

Related Questions