Josh Foskett
Josh Foskett

Reputation: 4121

Have YouTube notify a URL when a video is published?

I'm currently in the process of building a site, and one of the features that I want is to allow users who use YouTube to be able to have their videos automatically added to their feeds without them having to do anything.

I know that you can use YouTube's Data API to get a specific users videos, but I don't want to keep relying on that to check if a user has uploaded a new video, as it would become a burden, especially after more and more users register, as I'd have to check every 10 minutes or so for each account, and that adds up.

Therefore, I was wondering if YouTube had a feature in their API that would allow YouTube to notify a specific URL on my site when a user has published a video to YouTube. I've seen sites use YouTube to authenticate certain permissions, but I'm not sure if this is one, or what to specifically search.

Upvotes: 1

Views: 711

Answers (1)

Jeff Posnick
Jeff Posnick

Reputation: 56074

Actually, the YouTube Data API v2 should support PubSubHubbub notifications, which is basically what you describe: http://apiblog.youtube.com/2010/10/pubsubhubbub-for-youtube-activities.html

That should refers to the fact that PubSubHubbub within the YouTube API has a somewhat checkered history, as you might be able to tell from reading the Updates added to that blog post. I was actually just debugging some PubSubHubbub issues with the engineering team today, and while updates don't appear to be pushed out right now, a change going live early next week should hopefully resolve that.

An alternative approach is to use the Simple Update Protocol, but that requires some degree of polling.

The YouTube API engineering team is aware of the need to provide a stable, reliable means of subscribing to push updates in the new v3 of the API, but we don't have anything to announce yet.

Upvotes: 1

Related Questions