Hello David,
You can find the documentation for OAuth 2 authorization flows here:
http://code.google.com/apis/accounts/docs/OAuth2.html
From the use case that you describe I think you need one of these two
flows, the first one is for installed applications, the second one for
web applications:
http://code.google.com/apis/accounts/docs/OAuth2InstalledApp.html
http://code.google.com/apis/accounts/docs/OAuth2WebServer.html
Unfortunately we don't have examples of use in C#, but you can check
the Google APIs Client Library for .NET to see if you can use some of
the code from the project:
http://code.google.com/p/google-api-dotnet-client/
Cheers,
Silvano
--
Silvano Luciani | Developer Programs Engineer
Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London
SW1W 9TQ
Registered in England Number: 3977902
On Feb 22, 11:19 am, David <
mesoanalyt...@gmail.com> wrote:
> Hi,
>
> I'm trying to write a simple local windows program with C# that will download AdSense reporting daily so I can load the data into my db. I have almost no programming experience so I'm looking for the easiest way to do this.
>
> I tried to validate my API Key was working by using the URL below but I keep getting a 401 unauthorized error when I replace YOUR_API_KEY with my key:
>
>
https://www.googleapis.com/adsense/v1/reports?startDate=2012-01-01&en...{YOUR_API_KEY}