Score:0

Adding GA4 connection to AWS AppFlow

va flag

I am trying to add an AppFlow connection to an existing GA4 account, GA4 is already up and running and even pushing data to BigQuery.

However, when I try to create the connection in Appflow to start a flow from GA4 to Redshift. I get this error message

An error occured while creating the connection ga4.
Error authenticating to connector: Failed to validate Connection while attempting "ValidateCredentials with CustomConnector" with connector failure The request failed because the service Source Google Analytics 4 returned the following error: Details: Google Analytics 4 returned error message - Request failed with Status Code: 403, Error Reason: Forbidden. (Service: null; Status Code: 400; Error Code: Client; Request ID: null; Proxy: null)

Error Message Screenshot

I have followed this documentation. https://docs.aws.amazon.com/appflow/latest/userguide/connectors-google-analytics-4.html

I was able to create a GA UA connection, but it used a slightly different OAuth Configuration.

My GCP App is set to Production and is External, my Google Analytics API is enabled and the OAuth Web Application creds are created, and the Authorized redirect URIs is set to https://us-east-1.console.aws.amazon.com/appflow/oauth as suggested by the documentation.

When I add the clientID and clientSecret to AppFlow's connection and click connect, I get a google login pop up prompt, and when I login in it asks me to allow amazon.com to access my data and pull data etc, which I do allow, then the pop up disappears and the above error pops up in AWS.

GCP OAuth Configuration

Score:0
gs flag

I reached out to AWS Support and they told to enable "Google Analytics ADMIN API" in addition to "Google Analytics API". This resolved the issue.

They did mention they are working to update the documentation to mention that both api's need to be enabled.

Kareem Rashwan avatar
va flag
sorry for the late response, this is actually how we fixed it as well.. saw this response a little bit late. but we were able to solve it by enabling this API, thanks alot
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.