【问题标题】:Youtube Comment API: Comment Insert 403 forbidden insufficient permissionsYoutube 评论 API:评论插入 403 禁止权限不足
【发布时间】:2019-08-11 02:05:23
【问题描述】:

这就是我用来向 youtube 添加 cmets 的方法:

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】:

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

意味着当前经过身份验证的用户没有授予您执行此操作的权限。

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

【讨论】:

  • HTTPS 是必需的吗?
  • 对于授权,你当然不能在没有 HTTPS 的情况下登录身份验证服务器,这将是一场安全噩梦。
  • 我修好了。我使用 Gapi 插入评论
猜你喜欢
  • 2016-05-04
  • 2018-10-31
  • 2015-08-23
  • 2015-08-03
  • 2012-11-05
  • 2017-11-29
  • 2011-03-03
  • 2018-10-28
  • 2015-09-20
相关资源
最近更新 更多