Youtube api Youtube实时流媒体API liveChatNotFound

Youtube api Youtube实时流媒体API liveChatNotFound,youtube-api,google-apis-explorer,youtube-livestreaming-api,youtube-data-api,Youtube Api,Google Apis Explorer,Youtube Livestreaming Api,Youtube Data Api,我正试图找到一种方法从一个流中获取所有的消息,我已经很接近了,但是我得到了一个错误。由于某些原因,我使用的视频ID无效,即使它是有效的。也许我拿错身份证了?以下是XMLHttpRequest: https://www.googleapis.com/youtube/v3/liveChat/messages?liveChatId=hHW1oY26kxQ&part=snippet&key={API-KEY}&maxResults=2000 以下是答复: { "error":

我正试图找到一种方法从一个流中获取所有的消息,我已经很接近了,但是我得到了一个错误。由于某些原因,我使用的视频ID无效,即使它是有效的。也许我拿错身份证了?以下是XMLHttpRequest:

https://www.googleapis.com/youtube/v3/liveChat/messages?liveChatId=hHW1oY26kxQ&part=snippet&key={API-KEY}&maxResults=2000
以下是答复:

{
 "error": {
  "errors": [
   {
    "domain": "youtube.liveChat",
    "reason": "liveChatNotFound",
    "message": "The live chat that you are trying to retrieve cannot be found. Check the value of the requests \u003ccode\u003eliveChatId\u003c/code\u003e parameter to ensure that it is correct."
   }
  ],
  "code": 404,
  "message": "The live chat that you are trying to retrieve cannot be found. Check the value of the requests \u003ccode\u003eliveChatId\u003c/code\u003e parameter to ensure that it is correct."
 }
}

为下面的api传递您的视频id,并获取实际的livechat id

获取livechat id(替换为您的api密钥)

在响应中,您将找到livechatid,并将此livechatid传递给下面的api

获取所有聊天记录(替换为api密钥)