【发布时间】:2017-04-25 13:21:11
【问题描述】:
我正在尝试删除this video 上的以下评论 z12mdhjgxrfgtpf3d231jrz5vo3jdj0lo,但响应代码是 400。我正在使用频道管理员的令牌 https://www.googleapis.com/auth/youtube.force-ssl documentation 要求的范围。
请求是:
DELETE https://www.googleapis.com/youtube/v3/comments?id=z12mdhjgxrfgtpf3d231jrz5vo3jdj0lo&alt=json
{
"query_params": {
"id": "z12mdhjgxrfgtpf3d231jrz5vo3jdj0lo",
"alt": "json"
}
}
回应:
{
"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.",
"locationType": "parameter",
"location": "id"
}
],
"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."
}
}
请求有什么问题?
这是令牌调试信息:
{
issued_to: "493985796851.apps.googleusercontent.com",
audience: "493985796851.apps.googleusercontent.com",
user_id: "109704411339866376304",
scope: "https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.upload",
expires_in: 2452,
access_type: "offline"
}
【问题讨论】:
-
您似乎无权删除该评论。您确定您的访问令牌是有效的并且用于正确的渠道吗?
-
我想是的。我在问题中添加了令牌信息,它需要“force-ssl”范围,用户 109704411339866376304 是频道的所有者。
标签: youtube-api youtube-data-api