refactor
refactor

Reputation: 15044

Google Analytics Account summaries

In order to get Google Analytics Account summaries information , I need to make an HTTP call

https://www.googleapis.com/analytics/v3/management/accountSummaries?key={YOUR_API_KEY}

But I am not sure from where I will get {YOUR_API_KEY} value.

Upvotes: 0

Views: 319

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 116918

Account summaries is private data. That meaning that its data owned by the user who authenticates your application.

If you are accessing your own data then you can go to Google Developers console and create service account credentials. Then follow the documentation for your programing language on how to authenticate using a service account.

If you are accessing data owned by another user then you will need to use Oauth2. you can go to Google Developers console Oauth credentials. Then follow the documentation for your programing language on how to authenticate using Oauth2.

The correct call for that would be a HTTP get to

https://www.googleapis.com/analytics/v3/management/accountSummaries?access_token={access token returned by one of the above}

The documentation for Authorization can be found here

Upvotes: 1

Related Questions