Thanks Anash, especially the step 3 was the missing piece. I even
studied the .NET library source code in depth and saw that object
structure and thought about recompiling with headers exposed in the
AdWordsUser object but it just didn't occur to me that they already
are accessible in this way. That's genius what you did there. :-) I
still think the AdWordsUser object would allow to directly set this
value.

Sadly it doesn't seem to also be possible to save the AuthTokenand
later set it again this way (I still would like it this way since your
method still can cause repeat logins albeit much reduced). It is
internally saved in an AuthTokenCache and it would be nice to have a
method for the AdWordsUser to manipulate this cache with preset
values. If they aren't valid anymore the Authorization detects that
anyway and acquires a new AuthToken. Would it be ok if I make such a
request on the library's issue list?

Best wishes
Alexander


On Jan 24, 3:22 am, "Anash P. Oommen" <anash.p.oommen
+fo...@google.com> wrote:
> Hi Alexander,
>
> You could do this the following way:
>
> 1. Set your MCC email and password in your Web.config.
> 2. AdWordsUser user = new AdWordsUser(); // this picks up the credentials
> from the Web.config.
> 3. (user.Config as AdWordsAppConfig).ClientCustomerId =
> your_client_customerid; // now the object is customized to run for given
> customerId
> 4. Call whatever service or report download utilities here.
>
> With this setup, AuthToken is generated only once, so you won't run into
> captcha errors.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to