我(ContentsOwner,MCN)在哪里可以在Youtube报告API中找到最终确定的Red(Premium)和Superchat收入数据?

2024-04-26 07:56:45 发布

您现在位置:Python中文网/ 问答频道 /正文

在Youtube reporting API中找不到具有“Youtube红色合作伙伴收入报告”和“付费功能报告”的reportTypeId或Job

我最近在为创作者的收入报告开发系统。你知道吗

据我所知,我的公司(内容所有者,MCN)有3种收入来源于youtube,即

  1. Ads合作伙伴收入
  2. YouTube红色合作伙伴收入(YouTube Premium)
  3. 付费功能(超级帽)

所以我查阅了API,发现报告API supports System managed reports for contents owners! 但我找不到2)YouTube红色合作伙伴收入3)付费功能(超级帽)的收入报告

下面的列表是我在API中找到的系统管理报表类型 (所有报告均由系统管理)

  1. “id”:“内容\所有者\广告\收入\原始\ a1”,“名称”:“每月视频广告收入”
  2. “id”:“内容\所有者\广告\收入摘要\ a1”,“名称”:“每月视频广告收入摘要”
  3. “id”:“内容\所有者\资产\广告\收入\原始\ a1”,“名称”:“每月资产广告收入”
  4. “id”:“内容\所有者\资产\广告收入\汇总表\ a1”,“名称”:“每月资产广告收入汇总表”
  5. “id”:“内容\u所有者\u索赔\u广告收入\u摘要\u a1”,“名称”:“每月索赔广告收入”

因此,我检索/创建了报告并对其进行了汇总。你知道吗

但我发现,{}广告收入{}类报告只有1)广告合作伙伴收入数据。你知道吗

在哪里可以从Youtube reporting api找到Youtube Red(Premium)和Superchat收入数据?你知道吗

我有范围的Oauth标记

  1. https://www.googleapis.com/auth/yt-analytics.readonly
  2. https://www.googleapis.com/auth/youtube.force-ssl
  3. https://www.googleapis.com/auth/youtubepartner
  4. https://www.googleapis.com/auth/yt-analytics-monetary.readonly

import google.oauth2.credentials
from googleapiclient.discovery import build
from googleapiclient.http import HttpError

if __name__ == "__main__":
    yt_credentials = google.oauth2.credentials.Credentials.from_authorized_user_info(YOUTUBE_AUTH_TOKEN)
    yt_service = build(YOUTUBE_SERVICE_NAME, YOUTUBE_API_VER, credentials=yt_credentials)
    results = yt_service.reportTypes().list(includeSystemManaged=True,
                                               onBehalfOfContentOwner='MY Content Owner Id').execute()

    print(json.dumps(results, indent=4, sort_keys=True))

Tags: https名称apiid内容youtubea1www