Youtube Comment API: Comment Insert 403 forbidden insufficient permissions

非 Y 不嫁゛ 提交于 2019-12-02 18:01:43

问题


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."
 }
}

回答1:


Insufficient Permission: Request had insufficient authentication scopes.

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

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



来源:https://stackoverflow.com/questions/55259748/youtube-comment-api-comment-insert-403-forbidden-insufficient-permissions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!