youtube-api - 删除 YouTube 观看稍后播放列表项失败 - 返回 404

标签 youtube-api youtube-data-api

我有代码可以从我的 youtube watchLater 播放列表中删除一个项目。大约两周前,这一切正常 - 现在我收到来自 youtube 的 404 错误。

这是请求和响应的序列(当然,身份验证细节已被删除):

获取播放列表项目请求:

GET https://www.googleapis.com/youtube/v3/playlistItems?fields=items/id&part=snippet&playlistId=WLlue5EIJLscoxMgEkEZfq_A



获取播放列表项响应:
{
 "items": [
  {
   "id": "V0xsdWU1RUlKTHNjb3hNZ0VrRVpmcV9BLjU2QjQ0RjZEMTA1NTdDQzY="
  }
 ]
}

删除请求:

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



删除回复:
{
 "error": {
  "errors": [
   {
    "domain": "youtube.playlistItem",
    "reason": "playlistItemNotFound",
    "message": "Playlist item not found.",
    "locationType": "parameter",
    "location": "id"
   }
  ],
  "code": 404,
  "message": "Playlist item not found."
 }
}

当我通过 youtube 网站查看播放列表时,我可以看到该项目尚未删除。

api 的文档表明我做的一切都是正确的。在调试时,我注意到播放列表项 ID 是一个 base64 编码的字符串;我使用编码和解码的字符串得到 404。

这个问题不限于一个特定的项目;看来我放在 watchLater 播放列表中的任何项目都无法删除。从其他播放列表中删除项目没有任何问题;只有 watchLater 有这个问题。

任何人都知道发生了什么?

编辑(2016 年 10 月):谷歌表示稍后观看播放列表已被弃用。见 https://developers.google.com/youtube/v3/revision_history

最佳答案

该问题已在 google 问题跟踪器中关闭:

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.

关于youtube-api - 删除 YouTube 观看稍后播放列表项失败 - 返回 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36234393/

相关文章:

youtube - 是否可以使用 YouTube Live Stream API 通过我的手机摄像头进行广播?

parse-platform - 以最轻微的负载达到 YouTube API 服务限制

youtube - 如何在不使用AS3播放器的情况下将YouTube视频集成到Flex中

ios - Youtube API v3 search.list 返回不相关的视频 Swift

python - 当某个 channel 在 python 中上线时,如何获取 Youtube 视频 channel 的 URL?

youtube - 将YouTube API V3搜索与forMine = true一起使用时,invalidChannelId

youtube - TotalResults 计数与 YouTube v3 搜索 API 中返回的实际结果不匹配

php - 要包含必需的curl header 吗?

javascript - 在 Next.js 版本 13 中,如果根布局必须始终是服务器端组件,如何将 prop 传递给根布局中的组件?

android - 应在我的应用程序中进行哪些更改(其中没有广告)以避免违反 YouTube API 服务条款?