Youtube API:注释插入403禁止权限不足

时间:2016-01-27 20:07:48

标签: youtube youtube-api youtube-data-api

我正在使用https://developers.google.com/youtube/v3/docs/commentThreads/insert底部的API资源管理器来测试此调用。我正在申请范围https://www.googleapis.com/auth/youtube.force-ssl。感谢任何帮助!

REQUEST:

html, body {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

响应:

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

3 个答案:

答案 0 :(得分:1)

视频是私密的....在公共视频上工作得很好。

答案 1 :(得分:0)

我有类似的问题。我需要在标题中设置令牌。请求机构需要:

part: "snippet"

我认为您还需要设置标题:

Authorization: 'Bearer ' + access_token

答案 2 :(得分:0)

我上传了一个视频,默认情况下,评论被禁用。更改为“允许所有评论”后,就可以通过API进行发布。

相关问题