12

Recently, the youtube.playlistItems.list doesn't fetch a playlist item that is suitable for the youtube.playlistItems.update when listing the watchLater playlist. Its works perfectly for playlist that aren't under the relatedPlaylists category of a channel. (e.g. History, favourite, likes etc.)

My list response looks like this:

{
 "items": [
  {
   "id": "V0xWWlh5N2JrM0JSTjAtcDJVUmdjc3JRLjZCM0UwMDFFNUU3NzYzNjc=",
   "snippet": {
    "publishedAt": "2016-03-21T19:04:22.000Z",
    "title": "One Word - Episode 38: Skin Tone (Black Women)",
    .
    .
    .
    "channelTitle": "Ryan Carter",
    "playlistId": "WLVZXy7bk3BRN0-p2URgcsrQ",
    "position": 0,
    "resourceId": {
     "kind": "youtube#video",
     "videoId": "0gYgzN6B0y4"
    }
   }
  },

But when I use those values:

PUT https://www.googleapis.com/youtube/v3/playlistItems?part=snippet%2Cid&key={YOUR_API_KEY}

{
 "id": "V0xWWlh5N2JrM0JSTjAtcDJVUmdjc3JRLjZCM0UwMDFFNUU3NzYzNjc=",
 "snippet": {
  "playlistId": "WLVZXy7bk3BRN0-p2URgcsrQ",
  "resourceId": {
   "kind": "youtube#video",
   "videoId": "0gYgzN6B0y4"
  }
 }
}

I get:

404 null

- Show headers -

{
 "error": {
  "errors": [
   {
    "domain": "youtube.playlistItem",
    "reason": "playlistItemNotFound",
    "message": "Playlist item not found."
   }
  ],
  "code": 404,
  "message": "Playlist item not found."
 }

}

  • Down for just me?
  • Have Google blocked updates for the Watch Later playlist?
  • Is the service broken?
Tym
  • 90
  • 8
Ryan
  • 317
  • 3
  • 12
  • 1
    It would seem as though the Watch Later playlist has two IDs. The update call doesn't work with the values retrieved from the youtube.channels.list. [contentDetails.relatedPlaylists.watchLater]. But it does work for the id I found in the url starting with "PL" – Ryan Mar 27 '16 at 21:00
  • 1
    This looks like a bug in the API, as the functions are documented but not working. Where did you get the id "in the url starting with "PL" " ? This could be a good workaround... Thanks. – Tym Mar 28 '16 at 20:06
  • Yeah figured as much, the bug was introduced very recently which is a shame because my app depends on it heavily. I've been searching for the "PL" ID but can't find it. I got it from an old bookmark I had. – Ryan Mar 28 '16 at 22:57
  • 1
    FYI, reported here https://code.google.com/p/gdata-issues/issues/detail?id=8145 – Tym Mar 29 '16 at 18:54
  • this also impacts DELETEs - http://stackoverflow.com/q/36234393/953 – glob Mar 30 '16 at 03:33
  • 1
    well it appears to be some good sign. I tweeted and sent email to youtube ceo and in couple hours the defect went from open to "Accepted" status and a project member is assigned to it now. hope this gets fixed soon as i have had many users email me about it. – sudoExclaimationExclaimation Jul 15 '16 at 07:02

1 Answers1

10

Looks like the "bug" was just part of the transition period where YouTube planned to remove the ability to fetch the Watch Later and Watch History playlist through there API. As Tym commented the "bug" is/was tracked here: https://code.google.com/p/gdata-issues/issues/detail?id=8145 .

TLDR:

"Requests to retrieve playlist details (playlists.list) for a channel's watch history or watch later playlist will return an empty list after September 12, 2016. Requests to retrieve playlist items (playlistItems.list) in either of those playlists will also return an empty list after that time. This 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://developers.google.com/youtube/v3/revision_history#september-15-2016

Ryan
  • 317
  • 3
  • 12