gotocartik
gotocartik

Reputation: 157

Youtube Comment API: Comment Insert 403 forbidden insufficient permissions

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

Upvotes: 0

Views: 989

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 116918

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

enter image description here

Upvotes: 2

Related Questions