Group: http://groups.google.com/group/adsense-api/topics
- David <mesoanalytics@gmail.com> Feb 22 03:19AM -0800
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&endDate=2012-02-01&pp=1&key={YOUR_API_KEY}
How do I validate my API Key? Are there any examples of using the AdSense Management API to get simple reporting using the API Key?
Thanks,
D
- Silvano Luciani <silvano.luciani@google.com> Feb 22 07:38AM -0800
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
You received this message because you are subscribed to the Google Group adsense-api.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To post to this group, send email to adsense-api@googlegroups.com.
To unsubscribe from this group, send email to adsense-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.
No comments:
Post a Comment