Hi Sergio
Thanks for the quick response. I’ll look into that.
My next problem (which is Google's problem!), is that there is a major
bug in Version 1.1 of the .Net Beta Client API Library.
Fortunately, I've fixed it in my version of the client library source.
The problem is that the HttpWebRequestBuilder that constructs the REST
service URI uses an IDictionary for the query parameters. This will
not work for all calls to the service because some query parameters
are repeated, in my particular case; the Metric key for the Generate
Reports call has multiple values.
Build and run your AdSense.Sample in the GoogleApisSamples solution
and you will see a crash. You also have the report start and end
dates the wrong way around in the sample which doesn't help.
I've fixed it to allow multiple values for a particular query string
parameter. I can send you my code if you want.
Thanks
Peter
On May 9, 11:59 pm, Sérgio Gomes <
sergio.go...@google.com> wrote:
> Hi Peter,
>
> I'm afraid you can't use service accounts with the AdSense Management API,
> since it accesses protected user data.
>
> You'll need to use the standard web-based or installed OAuth 2.0 flows
> instead, and run through the authorisation flow once. You can, however,
> save your authentication data for subsequent runs, so that you only need to
> perform the authentication step once.
>
> You can take a look at the AuthorizationManager class used by the .NET
> samples to get an idea of how to persist your credential data between
> runs:
http://code.google.com/p/google-api-dotnet-client/source/browse/Sampl...