Hi,
I'm trying to share a negative keyword set from my MCC account to campaigns
in sub-accounts using the Google Ads API. This use case is doable through
the UI, but I'm getting an Exception using Java sdk v15. Here is my code :
List<String> resourceNames = new ArrayList<>();
CampaignSharedSet campaignSharedSet = CampaignSharedSet.newBuilder()
.setCampaign(campaignResourceName)
.setSharedSet(sharedSetResourceName)
.build();
CampaignSharedSetOperation campaignSharedSetOperation =
CampaignSharedSetOperation.newBuilder()
.setCreate(campaignSharedSet)
.build();
try (CampaignSharedSetServiceClient campaignCriterionServiceClient =
googleAdsClient.getLatestVersion().createCampaignSharedSetServiceClient()) {
MutateCampaignSharedSetsResponse response =
campaignCriterionServiceClient.mutateCampaignSharedSets(
customerId, ImmutableList.of(campaignSharedSetOperation));
response.getResultsList().forEach(result ->
resourceNames.add(result.getResourceName()));
}
and I am getting the following error:
Request
-------
MethodName:
google.ads.googleads.v15.services.CampaignSharedSetService/MutateCampaignSharedSets
...
Failure message: errors {
error_code {
request_error: INVALID_CUSTOMER_ID
}
message: "Invalid customer ID 'XXXXXXXXX'."
}
...
Status: Status{code=INVALID_ARGUMENT, description=Request contains an
invalid argument., cause=null}.
Where XXXXXXXXX is my MCC account.
What am I doing wrong? is That use case supported through the API ?
thank you,
Amine
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/3f2b333d-f64e-4ff6-a317-5eae5d7713bcn%40googlegroups.com.