使用 YouTube LiveStreamingAPI(LiveChatMessages) 是否违反服务条款?

Does using YouTube LiveStreamingAPI(LiveChatMessages) violate the Terms of Service?

我尝试获取视频的实时聊天,但是LiveChatMessages APIreturns以下用户的信息。

YouTube Terms of Service 禁止获取可能识别个人身份的信息。

Permissions and Restrictions

  1. collect or harvest any information that might identify a person (for example, usernames), unless permitted by that person or allowed under section (3) above;

我该怎么办?

  1. 无法使用 LiveChatMessages API。 (谁可以使用?)
  2. 如果我不参考 snippet.authorChannelId,我可以使用 LiveChatMessages API。
  3. 我什么都不在乎。

这里没有什么可担心的:仅从 API 获取 属性 snippet.authorChannelId 不违反任何 TOS 规范,因为此 属性 无非是发帖人ID:

snippet.authorChannelId (string)

The ID of the user that authored the message. This field is only filled for the following message types:

  • If the message type is textMessageEvent, the property value identifies the user that wrote the message.
  • If the message type is fanFundingEvent, the property value identifies the user that funded the broadcast.
  • If the message type is messageDeletedEvent, the property value identifies the moderator that deleted the message.
  • If the message type is newSponsorEvent, the property value identifies the user that just became a sponsor.
  • If the message type is userBannedEvent, the property value identifies the moderator that banned the user.

拥有用户 ID(即 YouTube 分配给 him/her 的用户 ID)不属于您引用的规范。

您可以很好地使用该 ID 来获取相应用户(即 YouTube 频道)的公开可用数据:只需调用 Channels.list API endpoint passing to it that ID as the parameter id for to obtain (again only public) data about that channel in the form of a Channel resource

否则最好注意遵守 YouTube 的 DTOS 规范,最好熟悉该文档的内容。