【发布时间】:2020-07-21 22:06:19
【问题描述】:
错误:googleapiclient.errors.HttpError: <HttpError 403 when requesting https://analyticsreporting.googleapis.com/v4/reports:batchGet?alt=json returned "Analytics Reporting API has not been used in project 190831311549 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/analyticsreporting.googleapis.com/overview?project=xxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.". Details: "[{'@type': 'type.googleapis.com/google.rpc.Help', 'links': [{'description': 'Google developers console API activation', 'url': 'https://console.developers.google.com/apis/api/analyticsreporting.googleapis.com/overview?project=xxxx'}]}]">
步骤:
- Google Analytics Reporting API 在云控制台启用
- 已创建服务凭据并将电子邮件作为读取/分析用户添加到 GA 帐户
- 我正在使用“Hello Analytics Reporting API V4”。蟒蛇代码
- 使用
apiclient.discovery和analytics = build('analyticsreporting', 'v4', credentials=credentials, cache_discovery=False) - 我也尝试了绕过我在https://developers.google.com/analytics/devguides/reporting/core/v4/rest/v4/reports/batchGet 处的python 代码的解决方法,但是当我尝试执行身份验证弹出窗口时保持空白并且加载程序一直在旋转并且chrome 开发工具显示
Failed to load resource: net::ERR_QUIC_PROTOCOL_ERROR.QUIC_PACKET_READ_ERROR
【问题讨论】:
标签: google-analytics google-analytics-api