I am trying to delete the Playlist Item (Video) in Playlist, If i pass the Playlist ID and Playlist Item ID (Video ID), Its throwing a error, i Can't delete the particular video in that playlist, pls help me to solve this issue
An client error occurred: (delete) missing required param : 'id'
$playlistItemResponse = $youtube->playlistItems->delete($_GET['videoid'],$playlistItem);
First, use the youtube.playlistItems.list
to list all the videos in the specific playlist. Just pass the playlistId
of the playlist that you want to get.
Here's the sample request for that:
And here is the Json response
My playlist is composed of three videos
Now, to delete a video in the Playlist, you need to use the youtube.playlistItems.delete
.
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.playlistItems.delete?id=&_h=1&
The id that you will put there is the id that you will get in the Json response. For example, in the above Json picture, to delete the video Kobe Bryant's Top 10 Deep Three-Pointers you need to pass the id "UExnVEMwb3J4akY1TXJTRUR6alQ3SjFsa1I0ell3UEVwZi4wMTcyMDhGQUE4NTIzM0Y5" in the youtube.playlistItems.delete
Hope this information helps you.