【发布时间】:2020-03-25 17:36:19
【问题描述】:
我正在尝试获取 YouTube 在我们上线时生成的视频 ID。我正在尝试将实时视频与我网站上的实时 cmets 小部件链接起来!
我当前的查询字符串是:https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UC4fb76SWvttKJ1T6a2g6yIw&eventType=live&key=[YOUR_API_KEY]
{
"error": {
"errors": [{
"domain": "youtube.search",
"reason": "invalidSearchFilter",
"message": "The request contains an invalid combination of search filters and/or restrictions. Note that you must set the \u003ccode\u003etype\u003c/code\u003e parameter to \u003ccode\u003evideo\u003c/code\u003e if you set either the \u003ccode\u003eforContentOwner\u003c/code\u003e or \u003ccode\u003eforMine\u003c/code\u003e parameters to \u003ccode\u003etrue\u003c/code\u003e. You must also set the \u003ccode\u003etype\u003c/code\u003e parameter to \u003ccode\u003evideo\u003c/code\u003e if you set a value for the \u003ccode\u003eeventType\u003c/code\u003e, \u003ccode\u003evideoCaption\u003c/code\u003e, \u003ccode\u003evideoCategoryId\u003c/code\u003e, \u003ccode\u003evideoDefinition\u003c/code\u003e, \u003ccode\u003evideoDimension\u003c/code\u003e, \u003ccode\u003evideoDuration\u003c/code\u003e, \u003ccode\u003evideoEmbeddable\u003c/code\u003e, \u003ccode\u003evideoLicense\u003c/code\u003e, \u003ccode\u003evideoSyndicated\u003c/code\u003e, or \u003ccode\u003evideoType\u003c/code\u003e parameters.",
"locationType": "parameter",
"location": ""
}],
"code": 400,
"message": "The request contains an invalid combination of search filters and/or restrictions. Note that you must set the \u003ccode\u003etype\u003c/code\u003e parameter to \u003ccode\u003evideo\u003c/code\u003e if you set either the \u003ccode\u003eforContentOwner\u003c/code\u003e or \u003ccode\u003eforMine\u003c/code\u003e parameters to \u003ccode\u003etrue\u003c/code\u003e. You must also set the \u003ccode\u003etype\u003c/code\u003e parameter to \u003ccode\u003evideo\u003c/code\u003e if you set a value for the \u003ccode\u003eeventType\u003c/code\u003e, \u003ccode\u003evideoCaption\u003c/code\u003e, \u003ccode\u003evideoCategoryId\u003c/code\u003e, \u003ccode\u003evideoDefinition\u003c/code\u003e, \u003ccode\u003evideoDimension\u003c/code\u003e, \u003ccode\u003evideoDuration\u003c/code\u003e, \u003ccode\u003evideoEmbeddable\u003c/code\u003e, \u003ccode\u003evideoLicense\u003c/code\u003e, \u003ccode\u003evideoSyndicated\u003c/code\u003e, or \u003ccode\u003evideoType\u003c/code\u003e parameters."
}
}
【问题讨论】:
标签: youtube-api google-apis-explorer