Thank You but I am using CampaignCriterionService. MutateCampaignCriteria
only. Getting the following error using the code:
How to fix the error? I am using the same code as mentioned in the
documentation
*CODE:*
CampaignCriterionServiceClient campaignCriterionServiceClient =
googleAdsClient.getLatestVersion().createCampaignCriterionServiceClient();
UserListInfo userListInfo =
UserListInfo.newBuilder().setUserList(userList).build();
CampaignCriterion campaignCriterion =
CampaignCriterion.newBuilder().setCampaign(ResourceNames.campaign(customerId,
campaignId)).mergeUserList(userListInfo).build();
CampaignCriterionOperation criterionOperation =
CampaignCriterionOperation.newBuilder().setCreate(campaignCriterion).build();
MutateCampaignCriteriaResponse response =
campaignCriterionServiceClient.mutateCampaignCriteria(Long.toString(customerId),
ImmutableList.of(criterionOperation));
*ERROR:*
request_id: "2aU6KGGvOVHmF06kHCreNA"
Status: Status{code=INVALID_ARGUMENT, description=Request contains an
invalid argument., cause=null}.Request ID 2aU6KGGvOVHmF06kHCreNA failed due
to GoogleAdsException. Underlying errors: Error 0: error_code {
context_error: OPERATION_NOT_PERMITTED_FOR_CONTEXT}message: "The operation
is not allowed for the given context."trigger { string_value:
"DISPLAY(DISPLAY_FULL_AUTOMATION)"}location { field_path_elements {
field_name: "operations" index: 0 } field_path_elements {
field_name: "create" } field_path_elements { field_name: "user_list"
}}
On Thursday, August 5, 2021 at 3:30:43 PM UTC+5:30 adsapi wrote:
> Hi Gaurav,
>
> Thank you for the reply.
>
> Please note that the customer match can only be used to Search, Shopping,
> Gmail, YouTube, and Display as discussed on this document
> <https://support.google.com/google-ads/answer/2497941?hl=en> ('*Customer
> Match*' section).
>
> As for your question about linking customer list to campaign, you can use
> the CampaignCriterionService.MutateCampaignCriteria
> <https://developers.google.com/google-ads/api/reference/rpc/v8/MutateCampaignCriteriaRequest>
> .
>
> Let me know if you have further concerns.
>
>
> Regards,
> [image: Google Logo]
> Ernie John Blanca Tacata
> Google Ads API Team
>
>
> ref:_00D1U1174p._5004Q2HLL0B:ref
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"AdWords API and Google Ads 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/a447c790-d877-44f6-93c3-38ae6a06bc22n%40googlegroups.com.