Kasun Rajapaksha
Kasun Rajapaksha

Reputation: 536

Is it possible to create a application to access another users account?

Is it possible to create a application which will acquire Google Analytics API access for other user's account?

Like Facebook apps getting authorized from users to access their account information, can we do the same with Google Analytics.

I have read the documentations, but it is really confusing.

Upvotes: 1

Views: 54

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117271

There are three types of authentication that work with Google Analytics API and most of the Google APIs actually. I agree it can be a little confusing in the beginning.

Public API key:

A public api key gives you access to public data. Public data is data that is not owned by anyone. In the instance of Google Analytics API the meta data api does not require anyone to give you permission to access it its a public data api. You can use a Public api key with it.

Service account

Service accounts are used when you want to access information that you the developer have access to. Your Google Analytics account for example. You can grant a service account access to your data just like you would any other user and it will be able to access it and there wont be any user intervention. You wont get the pop up asking you for permission to access data.

Oauth2

Oauth2 sometimes referred to as 3 legged OAuth, is used when you want to access another users data. For you to access there data they must approve your application give it permission to access your data. A browser window will pop up and a user will be asked if they want to give your application permission to access there data.

I hope this helps clear up any confusion. The Google Analytics documentation has a number of sample projects and tutorials that will help you get started.

Upvotes: 1

Related Questions