insert video into a playlist with youtube api v3

后端 未结 3 1499
天涯浪人
天涯浪人 2020-12-31 12:52

Hey so I am fairly familiar to the youtube api .. I know how to read channels and playlist along with getting any relevant video information I identify as Important I\'m us

3条回答
  •  死守一世寂寞
    2020-12-31 13:05

    Your resourceId isn't complete, as it doesn't identify to the API how to interpret the videoId parameter. Try setting the kind attribute of the resourceId, like this:

      "snippet": {
        "playlistId": "PL8hD12HFC-nuswc21_e64aPAy9B25sEH7",
        "resourceId": {
          "kind": "youtube#video",
          "videoId": "KMGuyGY5gvY"
        }
      }
    

    That way, the API will know in which 'domain' (so to speak) to locate the resource identified by the string you send in.

提交回复
热议问题