Downloaded v17.0 of the .NET API library, using the included sample code.
The sample to enumerate accounts using
AdWordsService.v201402.ManagedCustomerService has not problems using my MCC
as a root to make a recursive query, code successfully enumerates all MCCs
under it and other accounts (we are a large mature organization and have a
lot of Accounts).
Using the sample code from GetCampaigns, it shows "0 campaigns". I know
that there are dozens and dozens of campaigns within my MCC account
structure. It turns out that the sample does not take any kind of hierarchy
into consideration and only looks for campaigns within my master MCC. I had
to hack an instance of the CampaignService in the following manner:
var svc = (CampaignService)adwordsUser.GetService(
AdWordsService.v201402.CampaignService );
svc.RequestHeader = new RequestHeader
{
Version = "v201402" ,
GroupName = "mcm" ,
userAgent = " myapp (AwApi-DotNet/16.7.0, Common-Dotnet/2.2.0, .NET
CLR/4.0.30319.18444, gzip)" ,
developerToken = "somethinghardcoded" ,
clientCustomerId = ................
};
By setting the clientCustomerId I was able to specify an account under my
MCC and then get campaigns.
Adwords support - is this the proper way to do this?
Thanks.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.