3

作为contentOwner,我正在尝试使用 Google API 资源管理器运行查询,作为回报,我得到 403 禁止,以下是重现该问题的步骤:

  1. 使用collectivedigitalstudios@gmail.com 登录google.com
  2. 转到 API 资源管理器并输入所需的参数(https://developers.google.com/apis-explorer/#p/youtubeAnalytics/v1/youtubeAnalytics.reports.query?ids=contentOwner%253D%253DCollective&start-date=2013- 08-01&结束日期=2013-08-02&metrics=views&filters=channel%253D%253DUCYjk_zY-iYR8YNfJmuzd70A&_h=1& )
  3. 授权请求的范围:
    1. https://www.googleapis.com/auth/yt-analytics-monetary.readonly
    2. https://www.googleapis.com/auth/yt-analytics.readonly
  4. 执行

这是完整的请求/响应:

youtubeAnalytics.reports.query 在 14 分钟前执行 执行时间:796 毫秒

您无权执行此方法。

要求

GET https://www.googleapis.com/youtube/analytics/v1/reports?ids=contentOwner%3D%3DCollective&start-date=2013-08-01&end-date=2013-08-02&metrics=views&filters=channel%3D%3DUCYjk_zY-iYR8YNfJmuzd70A&key={YOUR_API_KEY}

Authorization:  Bearer ya29.AHES6ZQM1y53hLCD4uBa5BSjACg1Pr8NK4WmUUm_jyuxKYhVqA
X-JavaScript-User-Agent:  Google APIs Explorer

回复

403 Forbidden

- Hide headers -

cache-control:  private, max-age=0
content-encoding:  gzip
content-length:  118
content-type:  application/json; charset=UTF-8
date:  Thu, 15 Aug 2013 18:21:38 GMT
expires:  Thu, 15 Aug 2013 18:21:38 GMT
server:  GSE

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "forbidden",
    "message": "Forbidden"
   }
  ],
  "code": 403,
  "message": "Forbidden"
 }
}

我打开了一个错误,它被关闭为“WorksForMe”。好吧,它没有。

有什么建议么?

4

1 回答 1

0

你可以试试这个:

https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3D<YOUR_CHANNEL_ID>&start-date=2013-12-30&end-date=2014-01-05&metrics=views%2Cuniques%2Clikes%2Cdislikes%2Ccomments%2Cshares&dimensions=day&filters=video%3D%3D<YOUR_VIDEO>&sort=-day

并添加范围:https ://www.googleapis.com/auth/youtube

于 2014-01-09T18:00:45.320 回答