Youtube评论API:评论插入403禁止的权限不足

问题描述 投票:0回答:1

这就是我用来向youtube添加评论的内容:

gapi.client.youtube.commentThreads.insert({
          part: "snippet", commentData
        }).then(function (response) {
          console.log("response", response);
    })

这就是即时通讯:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "insufficientPermissions",
    "message": "Insufficient Permission: Request had insufficient authentication scopes."
   }
  ],
  "code": 403,
  "message": "Insufficient Permission: Request had insufficient authentication scopes."
 }
}
youtube-api android-youtube-api
1个回答
2
投票

权限不足:请求的身份验证范围不足。

表示当前经过身份验证的用户未授予您执行此操作的权限。

如果您查看文档comments.insert,您将看到为了使用此方法,您必须使用https://www.googleapis.com/auth/youtube.force-ssl范围对您的用户进行认证

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.