最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Google API for Monetization Issue when accessing Youtube Revenue data for channel - Stack Overflow

programmeradmin3浏览0评论

I have the ClientId and SecretKey json file and trying to get the estimatedRevenue for the youtube channel. I have this scope defined SCOPES = [".readonly"] Below is the python

responseRevenue = youtube_analytics.reports().query(
     ids="channel==MINE", 
     startDate="2025-01-01",  # Define a start date
     endDate="2025-02-01",    # Define an end date
     metrics="estimatedRevenue",         # Specify the metric
     filters="country==US",
     dimensions="day",        # Specify the dimension (e.g., daily data)
     sort="day"               # Sorting the data by day
    ).execute()

Authentication is successfully and I can see the Request going to the Google API but while fetching the revenue information, I get the below error

I have enabled "Youtube Analytics API", "Youtube Reporting API" and Quota is also not used much.

Encountered 403 Forbidden with reason "forbidden" Error during callback: <HttpError 403 when requesting ="channel==MINE",&startDate=2025-01-01&endDate=2025-02-01&metrics=views&dimensions=day&filters=&sort=day&alt=json returned "Forbidden". Details: "[{'message': 'Forbidden', 'domain': 'global', 'reason': 'forbidden'}]">

What other settings in Google Console or Youtube Studio I need to change so I get full access to the monetary (or Revenue) information,

发布评论

评论列表(0)

  1. 暂无评论