How to get Google Analytics data using OAuth?

后端 未结 4 945
Happy的楠姐
Happy的楠姐 2020-12-05 06:09

Hy guys, we are developing a system which will provide users with access to Google Analytics. I\'m trying to implement it in the way so user don\'t need to enter their Googl

4条回答
  •  天涯浪人
    2020-12-05 06:23

    There's a .NET/C# class for Google Data authentication that can be used to access the Google Analytics Data Export API (since the API is part of the Google Data standard, though you might need to make Google Analytics specific adjustments.)*

    The authentication is best managed by creating a Google Registered Application, as this allows you to make the authentication without security warnings (and, for that matter, security lapses).

    There are three forms of supported authentication; the 'secure'/passwordless ones are OAuth and AuthSub (which is the Google-proprietary version of OAuth); the hardcoded username and password version is referred to by Google as 'ClientLogin', and is not considered secure or ideal for multiple-user applications.

    *(Since you tagged the question .netc#)

    Edit: More details on using AuthSub or OAuth with the .NET library:

    AuthSubSupport: http://code.google.com/p/google-gdata/wiki/AuthSubSupport

    Code Samples on how to use the libraries for OAuth authentication: http://code.google.com/apis/gdata/docs/auth/oauth.html#2LeggedOAuth (Click the .NET tab).

提交回复
热议问题