I wish to provide additional content to my viewers, if they are subscribed to the membership program. The UI of YouTube doesn't provide me with the features I require, so I want to do this on my own website. Now I am unsure, if this is intended, and if it is, how I would go about checking this.
My approach would basically go something like this:
- Enable OAuth for Google-accounts on my website.
- Afterwards make an API-call to https://www.googleapis.com/youtube/v3/members to get a list of members
- Check if the Google-account corresponds to any YouTube account in the list. If yes, authorize the user, otherwise don't.Optimizations could include authorizing the user for a set time and not make an API-call each time. Also a refresh button for the user, if they become a member after logging in.
Is this the right approach? I can't find anything on the web on authorization through YouTube members. Also is there a sandbox to test this API? Currently I don't have access to an account that is members enabled, but I would like to start implementing.
I currently haven't tried anything, as I want to verify my approach beforehand.