YouTube注释API:注释插入403权限不足 [英] Youtube Comment API: Comment Insert 403 forbidden insufficient permissions

查看:293
本文介绍了YouTube注释API:注释插入403权限不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

This is what im using to add comments to youtube :

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

这就是我被击中时得到的:

This is what im getting while hit that :

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "insufficientPermissions",
    "message": "Insufficient Permission: Request had insufficient authentication scopes."
   }
  ],
  "code": 403,
  "message": "Insufficient Permission: Request had insufficient authentication scopes."
 }
}

推荐答案

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

Insufficient Permission: Request had insufficient authentication scopes.

完全意味着当前已通过身份验证的用户尚未授予您执行此操作的权限.

Means exactly that the currently authenticated user has not granted you the permissions to do that.

如果您查看文档 comments.insert ,则会看到为了使用此方法,您必须使用https://www.googleapis.com/auth/youtube.force-ssl范围

If you check the documentation comments.insert you will see that in order to use this method you must have authncated your user with the https://www.googleapis.com/auth/youtube.force-ssl scope

这篇关于YouTube注释API:注释插入403权限不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆