I want to access our Google Analytics account using the new version v3.0, but it seems that from everything that I read, in order to get a valid access token, the user must log in.
We want direct access to our own account, and not to the client, depending on their account. How to do this in PHP without having to send a browser to the Google login page? Is there a direct authentication API for v3.0?
EDIT
This is apparently the only method of accessing the API without interacting with the end user, which they call "Server to Server":
https://developers.google.com/accounts/docs/OAuth2ServiceAccount
EDIT 2
It seems like it's impossible to do ?; (
Warning: Very few Google APIs currently support service accounts. Currently, service accounts are supported by the following Google services developer services:
- Google Cloud Storage
- Google Prediction API
- Google URL Extender
- Google OAuth 2.0 Authorization Server
EDIT 3
It seems that there is a solution when I log in once, and then use Update Tokens to gain access without additional user input.
Sarke
source share