Alexander, You can set custom headers before you create the AdWordsUser in the .NET API. Just use a Dictionary<string,string> where the first string is the key and the second is the value and pass that to the constructor of the AdWordsUser.
Like so: Dictionary<string, string> customDictionary = new Dictionary<string, string>(); customDictionary.Add("Email", UserName); Then pass this to the AdwordsUser. You will need email, password, developertoken, and authtoken passed in as well to get the AdWordsUser to construct appropriately. On Jan 23, 12:27 pm, Alexander Nitschke <alexander.nitsc...@onlinehome.de> wrote: > Hi Kevin, > > I tried that but where can I "just change the clientCustomerId"? This > sounds great but the .NET AdwordsUser does require the > clientCustomerId in the headers which seemingly can't be modified > after creation of the AdwordsUser object with New > AdwordsUser(headers). At least I didn't see how to that but I am very > eager to hear how to do just this. > > Then I thought you meant setting the clientCustomerId as a predicate > to the ReportDefinition, but a try to do this of course only caused an > invalid authentication exception (clienCustomerId required) so it must > be the AdwordsUser headers. > > Please help me here. > > Best wishes > Alexander > > On Jan 20, 9:54 pm, Kevin Winter <kevin.win...@google.com> wrote: > > > > > > > > > We do recommend setting up an MCC account that has all accounts linked to > > it. Then you can create an AdWordsUser with the email and password of the > > MCC account and just change the clientCustomerId each time you want to > > download the report for a different user. > > > - Kevin Winter > > AdWords API Team > > > On Friday, January 20, 2012 12:21:26 PM UTC-5, Alexander Nitschke wrote: > > > > Hi Kevin, > > > > can you please tell me how to do this with the ASP.NET library? I > > > really looked for AuthToken related methods or attributes but didn't > > > find anything. > > > > Or another way of doing it (which I might even prefer) - is it > > > possible to login with the MCC account and download the report once > > > for each Customer without changing the AdwordsUser? Like having a > > > selector.predicate.field = "CustomerId" or similar? > > > > Best wishes and thanks for any answer > > > Alexander > > > > On Dec 16 2011, 8:18 pm, Kevin Winter <kevin....@google.com> wrote: > > > > Hi, > > > > In the PHP library, the tokens are generated in a lazy fashion, i.e. > > > > right before they are needed. If you don't cause the AuthToken to get > > > > generated BEFORE the fork, then each forked process will generate its > > > own, > > > > leading to CAPTCHA challenged. You can call GetAuthToken() ( > > >http://code.google.com/p/google-api-adwords-php/source/browse/trunk/s...) > > > > on the AdWordsUser which forces creation. Do this prior to the fork and > > > > each process will have a complete copy of the AdWordsUser object, > > > AuthToken > > > > and all, which can then be used to make requests without fear of CAPTCHA > > > > challenges. > > > > > - Kevin Winter > > > > AdWords API Team > > > > > On Friday, December 16, 2011 1:42:57 PM UTC-5, iateadonut wrote: > > > > > > I'm misunderstanding: > > > > > > I do this command only once: > > > > > $user = new AdWordsUser(); > > > > > > and then I loop through my customerId's like this: > > > > > $user->SetClientId($customerId); > > > > > > I thought only 'new AdWordsUser()' would generate a new AuthToken? -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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