I have a bunch of keys : client id, client secret, api key
But all the documentation show authentication using human interaction.
How do I use the dot net libraries for interacting with the Google API v3 and the AnalyticsService without user interaction? If I just use the API Key, I get "Google.Apis.Requests.RequestError Login Required"
There are no samples that I can find anywhere that do this.
EDIT : this is for one Google Analytics account, I have full access to it, username, password, client id, client secret, api/developer key, everything. I just want to have the utility download data without me everyday.
Here is my working code, this is for a console application that I call through a batch file process. I am not a .Net developer so this code may not be perfect, if you see any areas for improvements lets me know! Error handling is minimal as I do not want one failure to kill the batch
I am using the registry to store the access token and expire time Also have the privatekey.p12 files in the application folder The account is a User not an Admin on the profile.
Also posted here https://groups.google.com/forum/?fromgroups=#!topic/google-analytics-data-export-api/quIN0vX-psw
Example command line call: C:\DW\GoogleAnalyticsNicheSites\GoogleAnalyticsNicheSites.exe "ga:XXXX9049" "2012-04-01" "2012-04-01" "ga:visitors,ga:newVisits,ga:visits,ga:bounces,ga:pageviews" "ga:date,ga:medium" "XXXXXXXXXXXXXXXXXXXXXXXXXXXX-privatekey.p12" "XXXXX...@developer.gserviceaccount.com" "RegKey" > C:\Data\NicheSites\ga_58589049_moneyjobs.com_20120401.txt"