2
votes

Error: 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'}]}]">

Steps:

  1. Google Analytics Reporting API is enabled at cloud console
  2. Service credential is created and email is added to GA account as a read/analise user
  3. I´m Using the "Hello Analytics Reporting API V4." python code
  4. Using apiclient.discovery and analytics = build('analyticsreporting', 'v4', credentials=credentials, cache_discovery=False)
  5. I also have tryed a workaround bypassing my python code at https://developers.google.com/analytics/devguides/reporting/core/v4/rest/v4/reports/batchGet but when I try to execute the authentication pop-up stays blank and loader keeps spinning forever and chrome dev tools shows Failed to load resource: net::ERR_QUIC_PROTOCOL_ERROR.QUIC_PACKET_READ_ERROR
1

1 Answers

0
votes

Redirect to https://console.developers.google.com/apis/api/analyticsreporting.googleapis.com and login with the google account which you have created the client_id and client_secret, make sure you are in the same project from which the client id and secrets are used other wise change the project. If you do not have the access Ask admin to do the same

Click on Enable button as seen below screenshot enter image description here

Then try doing your work. it should work fine