【问题标题】:YouTube Analytics API - Content owner reportsYouTube Analytics API - 内容所有者报告
【发布时间】:2013-11-04 06:08:22
【问题描述】:

因此,我正在尝试使用 Monetary Analytics API 来获取给定 YouTube 频道的收入报告。 https://developers.google.com/youtube/analytics/v1/content_owner_reports

但是,要使用此 API,需要满足以下条件:

要检索内容所有者报告,请将 ids 参数值设置为 您对 contentOwner==OWNER_NAME 的 API 请求,其中 OWNER_NAME 指定内容所有者的 ID。询问您的合作伙伴经理,如果您是 不确定价值。

所以,在网上浏览后,我找到了非官方文档,这可能就是我要找的。 http://jump.techden.in/developers.google.com/youtube/partner/docs/v1/contentOwners/list

所以我添加了https://www.googleapis.com/auth/youtubepartner 范围,重新验证并提出了这个请求:

  def list_content_owners
    conn = FaradayAdapter.new("https://www.googleapis.com").conn

    params = {
      :fetchMine => true,
      :key => DEVELOPER_KEY
    }
    resp = conn.get do |req|
      req.url "/youtube/partner/v1/contentOwners", params
      req.headers["Authorization"] = "Bearer #{@token}"
    end
    debugger

    return nil unless resp.try(:status) == 200
    JSON.parse resp.body || nil
  end

但是,我收到以下 403 错误:

(rdb:1) resp.body "{\n \"error\": {\n \"errors\": [\n {\n
\"域\": \"usageLimits\",\n \"原因\": \"accessNotConfigured\",\n \"message\": \"访问未配置\"\n }\n ],\n \"code\": 403,\n \"message\": \"访问未配置\"\n }\n}\n"

我查看了我的开发者控制台https://code.google.com/apis/console/,并且我已经启用了所有与 YouTube 相关的 API。没有可用的特殊合作伙伴 API 列表。

那么,如果我无法获得 contentOwner id,那么 Analytics API 的意义何在?

【问题讨论】:

  • 您还在寻找答案吗?

标签: youtube-api youtube-data-api


【解决方案1】:

正如您所指的页面中明确描述的那样:https://developers.google.com/youtube/analytics/v1/content_owner_reports

contentOwner 与 Content ID API 相关,仅对少数合作伙伴可用。确保您的控制台中有此 API 可用,或询问您的合作伙伴经理您是否有资格使用此 API。

【讨论】:

  • 其中一些。询问您的 YT 联系人。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-12-17
  • 2017-04-12
  • 2021-06-27
  • 1970-01-01
  • 2020-05-25
  • 2017-06-21
  • 1970-01-01
相关资源
最近更新 更多