
我正在嘗試將 AppFlow 連線新增至現有 GA4 帳戶,GA4 已經啟動並運行,甚至將資料推送到 BigQuery。
但是,當我嘗試在 Appflow 中建立連接以啟動從 GA4 到 Redshift 的流程時。我收到此錯誤訊息
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)
我已遵循此文件。https://docs.aws.amazon.com/appflow/latest/userguide/connectors-google-analytics-4.html
我能夠建立 GA UA 連接,但它使用了略有不同的 OAuth 配置。
我的 GCP 應用程式設定為“生產”且為“外部”,我的 Google Analytics API 已啟用並創建了 OAuth Web 應用程式信用,並且授權重定向 URI 設定為https://us-east-1.console.aws.amazon.com/appflow/oauth按照文件的建議。
當我將clientID 和clientSecret 新增至AppFlow 的連線並點擊「連線」時,我會收到一個google 登入彈出提示,當我登入時,它會要求我允許amazon.com 存取我的資料並提取資料等,這是我允許的,然後彈出視窗消失,並在 AWS 中彈出上述錯誤。
答案1
我聯繫了 AWS Support,他們告訴我除了「Google Analytics API」之外還要啟用「Google Analytics ADMIN API」。這解決了這個問題。
他們確實提到他們正在努力更新文檔以提及需要啟用這兩個 api。