Google Analytics Connector not working with API Key in Authenticator

Good morning, I’m needing some help with Google Authenticator to populate the Google Analytics Connector node with the GA4 account and property when using the API Key vs. manual login each time.

When I use the interactive login credentials with google sheets (read only) and google analytics (read only) scopes activated, The connectors are successful and the readers pull through data.

However, when I switch to API Key so that I can automate the work flow and not have to manually intervene on the login process, The google sheets works well, but the analytics connector isn’t reading the ID:

I have enable the APIs in the google developer console, created an IAM service, downloaded the JSON key, but for some reason, getting errors.

When I look in Google console for errors, I do see this error:

The GetProperty is giving me an error:

Are there insufficient level of access? A flag that I missed? The API Key is working for Google Sheets, which is a property that I own and manage, the Google Analytics property is owned by me, but my client invited me with access, so it’s possible that he needs to turn on access for an API?

Hi, let’s see if I can help a bit (but I’m not an expert in navigating Google Cloud Console…).

When you say “created an IAM service”, do you mean a Service Account?

The way I had it set up for testing was using a Service Account for which I created an API key. I gave the service account access to my Google Analytics property.

First, I used my Google account to create a project under our organization.
While having the project selected in the top bar:

  • I enabled “Google Analytics Admin API” and “Google Analytics Data API” unter “APIs & Services” → “Enabled APIs & services”.
  • I created a service account under “IAM & Admin”. Note down the very long service account email address. When you select the new service account, it has a “Keys” tab, where I created a new (private) key (gives the option for JSON and P12).

Over on https://analytics.google.com:

  1. Select the relevant Analytics Account
  2. Select the relevant Analytics Property
  3. Go to Admin in the lower left corner
  4. Go to “Property settings” (collapsible menu) → “Property” → “Property access management”, a slideout opens from the right-hand side
  5. “+” to add a user
  6. Enter the long service account email address, “Viewer” standard role

These are the steps I was able to retrace from when I set it up last year.

Maybe the client did not give access to the service account email address (in case you used that)?

Btw, in case you run into Quota limitations using the built-in KNIME OAuth client ID, you might need to set up your own OAuth client ID, as detailed in this helpful post: URGENT ISSUE| GA Authentication | Interactive | quota exceeded - #19 by Gavin_Attard

Let me know if that helps, otherwise I can try to diagnose further :slight_smile:

Best,
Manuel

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.