我有一个软件,可让您创建对YouTube视频评论的回复。因此,我使用youtube API v3 comments.insert方法。POST https://www.googleapis.com/youtube/v3/comments?part=id%2Csnippet&access_token=[access_token]
{
"snippet": {
"parentId": "parentId",
"textOriginal": "test message"
}
}
大多数情况下,请求成功。但是对于某些评论,我无法以这种方式创建回复。 API始终返回:{
"error": {
"errors": [
{
"domain": "youtube.comment",
"reason": "processingFailure",
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the <code>comment</code> resource in the request body to ensure that it is valid.",
"locationType": "other",
"location": "body"
}
],
"code": 400,
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the <code>comment</code> resource in the request body to ensure that it is valid."
}
}
我正在使用有效的访问 token ,并且parentId也有效,因为我可以通过API检索它。
我查看了成功和失败的请求,但没有发现任何区别。因此,我认为错误消息中提到了请求输入不是无效的。
我认为该错误不是暂时性错误,因为几天后相同的请求仍然失败。
我还尝试通过API资源管理器针对此类评论创建回复,但结果是相同的。
有人遇到同样的问题吗,或者我做错了什么?
最佳答案
当我观看视频并直接查看评论时,ID为z13tjxdqnuygy1lga04cilcqxqipg1zbtbs
的评论下面有一个“回复”选项,而ID为z13rgftjgw3bulyou04ccfnbjofztxg54yo0k
的评论则没有。该用户似乎是通过其Google+信息页发表了评论,并且已禁用对其帖子的回复。
关于api - 无法创建对某些现有YouTube评论的回复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32220648/