Answer the question
In order to leave comments, you need to log in
How to check if a user is subscribed to a YouTube channel when organizing VIP access?
Hello dear, there is a site on wordpress
How to check if a user is subscribed to a channel or not? Provided that he is authorized on the site
Purpose; creation of closed content for YouTube subscribers
Answer the question
In order to leave comments, you need to log in
You need to ask the user to log in through your YouTube app and give permission youtube.readonly
to access their data.
See the YouTube Data API subscriptions:list method . Pay attention to the example “check whether a subscription exists” - just your task, and there are code examples, incl. in PHP (scroll to the right).
To work with PHP , you need to install the Google PHP SDK: composer require google/apiclient:^2.0
, create a project in the API console , create an OAuth key, download its JSON.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question