0

使用 yt api explorer(拥有 oAuthd 具有完全权限的资源管理器),但在尝试插入播放列表项时出现此错误

403 Forbidden

            - Show headers -

            {
             "error": {
              "errors": [
               {
                "domain": "youtube.common",
                "reason": "forbidden",
                "message": "Forbidden"
               }
              ],
              "code": 403,
              "message": "Forbidden"
             }
            }

这是请求

POST https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&key={YOUR_API_KEY}

    Content-Type:  application/json
    Authorization:  Bearer ya29.AHES6ZSnBwWDrjGUDHRJQx1QLM0pw3t5xqly3t95DCISfUo
    X-JavaScript-User-Agent:  Google APIs Explorer

    {
     "id": "PLmzmv3DHYPlfztdaeGokYjX6l6f-0JsIH",
     "snippet": {
      "playlistId": "PLF1D540E51D694619",
      "resourceId": {
       "videoId": "TqmU2q5erdM",
       "kind": "youtube#video"
      }
     }
    }
4

1 回答 1

2

你不应该把id。你应该只这样放 playlistId

{
 "snippet": {
  "playlistId": "PLpZ720-WRTJz-LFGDm1yzAoClUE6795ft",
  "resourceId": {
   "videoId": "WV4CJ7A7Yo8",
   "kind": "youtube#video"
  }
 }
}
于 2013-11-08T00:31:39.580 回答