Nick Fitzpatrick
Nick Fitzpatrick

Reputation: 285

Google Authentication C#

I've been doing some research on how to get my C# console application to pull data from the Google Analytics API for quite some time now, and I'm rather confused. I currently had an application to do this, but I it has stopped working since it was using API V2.3 (which has been discontinued). I would like to re-write this application to use API V3.0 and OAuth2.0, but I can't seem to figure out how to get the authentication to work properly from the console app.

So my question is this: What "Scenario" would I use in the case where I have a command line application attempting to do OAuth2.0 (Google has a list of them here). My guess is that I need to follow the "Service accounts" scenario, but the only reason I assume this is because I don't believe I can do whole browser redirect thing through a command line interface.

Any assistance would be greatly appreciated!

Upvotes: 3

Views: 4306

Answers (1)

Josh
Josh

Reputation: 44906

Google actually has some client libraries that handle this for you. The .Net one even has a command line example :)

Upvotes: 3

Related Questions