Google Analytics API v3 authorization to allow access to my data

前端 未结 3 810
既然无缘
既然无缘 2021-02-13 14:14

I am developing an app that allows users to see my own Google Analytics Data using Google API v3. Everything I researched seems to indicate that users need to login into their G

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-13 15:16

    I believe what you want to do is set up a Service Account: https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtAuthorization

    "Useful for automated/offline/scheduled access to Google Analytics data for your own account. For example, to build a live dashboard of your own Google Analytics data and share it with other users.

    There are a few steps you need to follow to configure service accounts to work with Google Analytics:

    1. Register a project in the APIs Console.
    2. In the Google APIs Console, under the API Access pane, create a client ID with the Application Type set to Service Account.
    3. Sign-in to Google Analytics and navigate to the Admin section.
    4. Select the account for which you want the application to have access to.
    5. Add the email address, from the Client ID created in the APIs Console from step #2, as a user of the selected Google Analytics account.
    6. Follow the instructions for Service Accounts to access Google Analytics data: https://developers.google.com/accounts/docs/OAuth2ServiceAccount"

提交回复
热议问题