首页 > 解决方案 > 使用“mine”参数向 /youtube/v3/channels 请求返回一个空列表

问题描述

描述

根据请求向 /youtube/v3/channels 返回一个空列表,其中包含“Pavel Timofeev”帐户的“mine”参数

API 请求

curl 'https://www.googleapis.com/youtube/v3/channels?part=snippet%2CcontentDetails%2Cstatistics&mine=true&key=[YOUR_API_KEY]' --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' --header 'Accept: application/json'

结果

{
 "kind": "youtube#channelListResponse",
 "etag": "\"SJZWTG6xR0eGuCOh2bX6w3s4F94/ug6gw2ea7tNlKYNqjD7RJU4SUng\"",
 "pageInfo": {
  "totalResults": 0,
  "resultsPerPage": 0
 },
 "items": []
}

预期结果

{
 "kind": "youtube#channelListResponse",
 "etag": "\"SJZWTG6xR0eGuCOh2bX6w3s4F94/6XpBo9xc7xcya6KgYTuw-lrE8Ic\"",
 "pageInfo": {
  "totalResults": 1,
  "resultsPerPage": 1
 },
 "items": [
  {
   "kind": "youtube#channel",
   "etag": "",
   "id": "UCp9MJyPDG_i6HIoWF0FHa4g",
   "snippet": {
    "title": "Name",
    "description": "",
    "publishedAt": "2018-08-10T14:40:14.000Z",
    "thumbnails": {
     "default": {
      "url": "",
      "width": 88,
      "height": 88
     },
     "medium": {
      "url": "",
      "width": 240,
      "height": 240
     },
     "high": {
      "url": "",
      "width": 800,
      "height": 800
     }
    },
    "localized": {
     "title": "Name",
     "description": ""
    }
   },
   "contentDetails": {
    "relatedPlaylists": {
     "likes": "LLp9MJyPDG_i6HIoWF0FHa4g",
     "favorites": "FLp9MJyPDG_i6HIoWF0FHa4g",
     "uploads": "UUp9MJyPDG_i6HIoWF0FHa4g",
     "watchHistory": "HL",
     "watchLater": "WL"
    }
   },
   "statistics": {
    "viewCount": "0",
    "commentCount": "0",
    "subscriberCount": "0",
    "hiddenSubscriberCount": false,
    "videoCount": "0"
   }
  }
 ]
}

它是 100% 可重现的吗?

这个问题已经可以在“Pavel Timofeev”账户上重现,但它永远不会在“Orange Test Brand”账户上重现 在此处输入图像描述

可重现的 API 资源管理器链接

https://developers.google.com/youtube/v3/docs/channels/list?apix_params=%7B%22part%22%3A%22snippet%2CcontentDetails%2Cstatistics%22%2C%22mine%22%3Atrue%7D&apix=true

文档

https://developers.google.com/youtube/v3/docs/channels/list#common-use-cases

问题

有没有其他人遇到过这样的问题?请帮忙解决这个问题。

标签: youtube-apiyoutube-data-api

解决方案


推荐阅读