YouTube API V3:通过频道过滤我的订户

发布于 2025-02-08 10:36:17 字数 1033 浏览 0 评论 0原文

因此,我正在构建一个Web应用程序,通过使用V3 Data API,通过API检查某些频道(用户)是否被订阅了某个(授权)频道: https://developers.google.com.google.com/youtube.com/youtube/youtube/v3/docs/subscript/列表

显然,订阅/列表API在尝试检索mySubScribers = true时,API有限制,对于大型频道来说,这根本是不可行的。同样,我想检查的用户数量是动态的,因此对他们进行迭代并从他们的角度进行检查(我有Auth Sigkens)似乎有些密集。

我注意到的是,forchannelid过滤器可以过滤用户订阅,但不能过滤通道订阅者。

这根本可能吗?

理想情况下,查询:

https://youtube.googleapis.com/youtube/v3/subscriptions?part=subscriberSnippet&forChannelId=xxxxxxx%2Cyyyyyy&mySubscribers=true&key=[YOUR_API_KEY]

将返回由forchannelid频道过滤的授权频道订户,与订阅的方式相同:

https://youtube.googleapis.com/youtube/v3/subscriptions?part=subscriberSnippet&forChannelId=xxxxxxx%2Cyyyyyy&mine=true&key=[YOUR_API_KEY]

是否有任何替代方法可以在没有单个批量呼叫中实现此类检查,而没有任何替代方法必须循环浏览用户,我想检查并花费潜在的不必要的配额点?

So I am building a web app whereby I want to check if certain channels (users) are subscribed to an certain (authed) channel via the API using the v3 Data API:
https://developers.google.com/youtube/v3/docs/subscriptions/list

Obviously the subscriptions/list API has restrictions when trying to retrieve mySubscribers=true and it simply wouldn't be feasible for large channels. Also the number of users I want to check is dynamic, and so iterating over them and checking from their perspective (I have auth tokens) seems a little intensive.

What I have noticed is that the forChannelId filter works to filter a users subscriptions, but not for filtering a channels subscribers.

Is this possible at all?

Ideally the query:

https://youtube.googleapis.com/youtube/v3/subscriptions?part=subscriberSnippet&forChannelId=xxxxxxx%2Cyyyyyy&mySubscribers=true&key=[YOUR_API_KEY]

Would return the authed channels subscribers filtered by the forChannelId channels, the same way as the it does for subscriptions:

https://youtube.googleapis.com/youtube/v3/subscriptions?part=subscriberSnippet&forChannelId=xxxxxxx%2Cyyyyyy&mine=true&key=[YOUR_API_KEY]

Is there any alternative way to achieve such a check in a single bulk call, without having to loop over users I want to check and spending potentially unnecessary quota points?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文