i have code that deletes an item from my youtube watchLater playlist. this was working ok up to about two weeks ago - now i'm getting a 404 error from youtube.
here's the sequence of requests and responses (with authentication details stripped, of course):
get playlist items request:
get playlist items response:
{
"items": [
{
"id": "V0xsdWU1RUlKTHNjb3hNZ0VrRVpmcV9BLjU2QjQ0RjZEMTA1NTdDQzY="
}
]
}
delete request:
delete response:
{
"error": {
"errors": [
{
"domain": "youtube.playlistItem",
"reason": "playlistItemNotFound",
"message": "Playlist item not found.",
"locationType": "parameter",
"location": "id"
}
],
"code": 404,
"message": "Playlist item not found."
}
}
when i view the playlist via the youtube web site, i can see that the item hasn't been deleted.
the docs for the api indicate that i'm doing everything correctly. while debugging i noticed that the playlist item id is a base64 encoded string; i get 404 using both the encoded and decoded string.
this issue isn't limited to one particular item; it appears any item i place in my watchLater playlist cannot be deleted. i don't have any issues deleting items from other playlists; only watchLater is having this problem.
anyone have any idea what's going on?
Edit (Oct 2016): Google have said the Watch Later playlist has been deprecated. See https://developers.google.com/youtube/v3/revision_history
The issue is closed in the google issue tracker:
Marking this issue as Obsolete as the Watch Later playlist has been deprecated. Please see the Revision History for details: https://developers.google.com/youtube/v3/revision_history
In addition, requests to retrieve playlist details (playlists.list) or playlist items (playlistItems.list) for a channel's watch history or watch later playlist now return empty lists. This behavior is true for the new values, HL and WL, as well as for any watch history or watch later playlist IDs that your API Client may have already stored.
来源:https://stackoverflow.com/questions/36234393/deleteing-a-youtube-watchlater-playlist-item-failing-returning-404