DELETEing a YouTube watchLater playlist item faili

2019-03-14 01:35发布

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 https://www.googleapis.com/youtube/v3/playlistItems?fields=items/id&part=snippet&playlistId=WLlue5EIJLscoxMgEkEZfq_A

get playlist items response:

{
 "items": [
  {
   "id": "V0xsdWU1RUlKTHNjb3hNZ0VrRVpmcV9BLjU2QjQ0RjZEMTA1NTdDQzY="
  }
 ]
}

delete request:

DELETE https://www.googleapis.com/youtube/v3/playlistItems?id=V0xsdWU1RUlKTHNjb3hNZ0VrRVpmcV9BLjU2QjQ0RjZEMTA1NTdDQzY=

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

1条回答
爷的心禁止访问
2楼-- · 2019-03-14 02:13

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.

查看更多
登录 后发表回答