I'm trying to use the latest .NET client libraries to access Version 3.0 of the Google Analytics API (Core Reporting API). I registered my application in the Google APIs Console and used OAuth 2.0 for accessing the API.
Since there are no samples yet how to use the Google Analytics API, I used a sample that demonstrates the simplest use case for an OAuth2 service and applied that schema to my context - with success.
(Remark: I also found help to correct the mistakes in the source code of the library Google.Apis.Analytics.v3.dll)
If I use my program, I am required to login to Google, to grant permissions to my application and to copy an authorization code.
I would like to skip this flow by writing my login password into the program code (- in clear text). My problem ist that I can't find this feature in the libraries. In Google Analyitcs Version 2.3, it did work with the simple C# lines:
AnalyticsService asv = new AnalyticsService("");
asv.setUserCredentials(CLIENT_USERNAME, CLIENT_PASS);
Can anybody help me?