I need to retrieve data from Google Analytics programatically in order to generate some reports, so OAuth 2.0 is not an option since it asks for user authorization.. Is there a way to retrieve data from GA API v3, using the API KEY ? thanks!
我需要以编程方式从Google Analytics检索数据以生成一些报告,因此OAuth 2.0不是一个选项,因为它要求用户授权。有没有办法使用API KEY从GA API v3检索数据?谢谢!
1 个解决方案
#1
0
The user must be authenticated to grant your application access to his data. This applies to any use case.
必须对用户进行身份验证,以授予您的应用程序访问其数据的权限。这适用于任何用例。
You can certainly use OAuth 2.0. Google offers the possibility to obtain an access token, which can be used by your application to access user data. In this case, the user only needs to be authorized once.
您当然可以使用OAuth 2.0。 Google提供了获取访问令牌的可能性,您的应用程序可以使用该令牌来访问用户数据。在这种情况下,用户只需要被授权一次。
See https://developers.google.com/accounts/docs/OAuth2WebServer#callinganapi for more info about accessing Google API's with an application using OAuth 2.0.
有关使用OAuth 2.0访问带有应用程序的Google API的详细信息,请参阅https://developers.google.com/accounts/docs/OAuth2WebServer#callinganapi。
#1
0
The user must be authenticated to grant your application access to his data. This applies to any use case.
必须对用户进行身份验证,以授予您的应用程序访问其数据的权限。这适用于任何用例。
You can certainly use OAuth 2.0. Google offers the possibility to obtain an access token, which can be used by your application to access user data. In this case, the user only needs to be authorized once.
您当然可以使用OAuth 2.0。 Google提供了获取访问令牌的可能性,您的应用程序可以使用该令牌来访问用户数据。在这种情况下,用户只需要被授权一次。
See https://developers.google.com/accounts/docs/OAuth2WebServer#callinganapi for more info about accessing Google API's with an application using OAuth 2.0.
有关使用OAuth 2.0访问带有应用程序的Google API的详细信息,请参阅https://developers.google.com/accounts/docs/OAuth2WebServer#callinganapi。