Search code examples
youtubenotificationsyoutube-apisubscribeunsubscribe

How to get Youtube API notifications when a user subscribes and unsubscribes?


I can't find anything in the API about this, I want to setup my own database of youtube subscribers and update it automatically in real time. Is this possible without polling for and parsing email notifications?

Thanks


Solution

  • youtube.subscriptions.list
    

    You need to poll this web service directly, but it will return all your subscribers in a list if you set the "mySubscribers" variable to True.

    More info: https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.subscriptions.list

    You can then code a way to find new users and update your local database.