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

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

问题描述:

我正在使用 https://developers 底部的 API 浏览器.google.com/youtube/v3/docs/commentThreads/insert 来测试这个调用.我正在请求范围 https://www.googleapis.com/auth/youtube.force-ssl.感谢您的帮助!

I'm using the API explorer at the bottom of https://developers.google.com/youtube/v3/docs/commentThreads/insert to test this call. I am requesting the scope https://www.googleapis.com/auth/youtube.force-ssl. Appreciate any help!

请求:

POST https://www.googleapis.com/youtube/v3/commentThreads?part=id%2Csnippet&fields=id&key={YOUR_API_KEY}
{
 "snippet": {
  "topLevelComment": {
   "snippet": {
    "textOriginal": "comment from gdev"
   }
  },
  "videoId": "B5BypNLbBgQ",
  "channelId": "UCNqqFgLtbSjc9Er7XFv4wbA"
 }
}

回复:

{
 "error": {
  "errors": [
   {
    "domain": "youtube.commentThread",
    "reason": "forbidden",
    "message": "The comment thread could not be created due to insufficient permissions. The request might not be properly authorized.",
    "locationType": "other",
    "location": "body"
   }
  ],
  "code": 403,
  "message": "The comment thread could not be created due to insufficient permissions. The request might not be properly authorized."
 }
}

该视频是私人的.... 在公共视频上运行良好.

The video was private.... Worked fine on a public video.