Google Analytics API: “User does not have sufficient permissions for this account.”

后端 未结 9 2046
谎友^
谎友^ 2020-12-05 09:16

I\'m writing a Ruby app that accesses the Google Analytics API to pull down some experiment information.

The app connects and authenticates using a Google Service Ac

9条回答
  •  北荒
    北荒 (楼主)
    2020-12-05 10:04

    Make sure you give the service account email (something like 1234567890@developer.gserviceaccount.com) permissions to read/write from your GA view.

    Admin > View > User Management > "Add permissions for:"

    I got this issue when I try to integrate GA source to metabase.

    Metabase requires Oauth clientid and secret. So I create Oauth clientid in GA (If you face an issue which said you need a Guite user to make it internal access, then you need register a new account under workspace).

    Then, I solve this issue by adding my google cloud(workspace) account to view user management, not 1234567890@developer.gserviceaccount.com

    Just the google cloud login account, I tried with 1234567890@developer.gserviceaccount.com but it doesn't work. The difference for metabase is it ask the oauth id and secret for your google cloud account not service account.

    Hope this can help someone face the same situation.

    But it is still trick because another GA4 service which don't have any view How to create view in Google Analytics 4 Still can't solve this issue. If any one knows it, please comment. Just don't know how to call the api in GA4 since there isn't view at all.

提交回复
热议问题