Google Ads API team and all.
I have access to 3 Google Ads manager accounts.
When getting Google Ads API data for each using C#/.Net client, it works
only if for the specific manager customer in the App Config file:
<GoogleAdsApi>
<add key=*"LoginCustomerId" *value="XXXXXXXXXX" />
I tried to populate it dynamically under "options". See info below, but
some how it gets ignored and Google API seems to only see/recognize the
LoginCusomterID in the Apps.config.
I tried to add it in this section, but it is being ignored.
codeExample.Run(new GoogleAdsClient(), options.CustomerId,
*options.LoginCustomerId,*Start_date_new, End_date_new, DMS_STORE_ID);
when calling the API as is does not accept the LognincustomeriD under:
googleAdsService.SearchStream(customerId.ToString(),query,
delegate (SearchGoogleAdsStreamResponse resp)
Appreciate any help, thanks
public class Options : OptionsBase
{
[Option("customerId", Required = true, HelpText =
"The Google Ads customer ID for which the call is made.")]
public long CustomerId { get; set; }
[Option("LoginCustomerId", Required = false, HelpText =
"Optional Login customer ID if your access to the CIDs is via
a manager account.")]
public long* LoginCustomerId *{ get; set; }
}
Options options = new Options();
CommandLine.Parser.Default.ParseArguments<Options>(args).MapResult(
delegate (Options o)
{
options = o;
return 0;
}, delegate (IEnumerable<Error> errors)
{
options.CustomerId =
long.Parse("aaaaaaaa");
options.LoginCustomerId =
long.Parse("XXXXXXXXXX);
return 0;
});
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/b2509d9d-009a-4886-8401-bdf888594218n%40googlegroups.com.