errors {
error_code {
operator_error: OPERATOR_NOT_SUPPORTED
}
message: "Operator not supported."
trigger {
string_value: "CriterionId{id=30000}"
}
location {
field_path_elements {
field_name: "operations"
index {
}
}
field_path_elements {
field_name: "create"
}
field_path_elements {
field_name: "device"
}
}
}
Here is the api client library usage that is causing this error:
public String targetCampaignDevice(Long customerId, Long campaignId, DeviceEnum.Device device)
{ GoogleAdsClient googleAdsClient = getGoogleAdsClient();
String campaignResourceName = ResourceNames.campaign(customerId, campaignId); ArrayList<CampaignCriterionOperation> ops = new ArrayList<>();
// Set device criteria CampaignCriterion.Builder criterionBuilder = CampaignCriterion.newBuilder() .setCampaign(StringValue.newBuilder().setValue(campaignResourceName).build()) .setDevice(DeviceInfo.newBuilder().setType(device).build());
CampaignCriterion criterion = criterionBuilder.build();
ops.add(CampaignCriterionOperation.newBuilder() .setCreate(criterion) .build());
try (CampaignCriterionServiceClient campaignCriterionServiceClient = googleAdsClient.getLatestVersion().createCampaignCriterionServiceClient()) { MutateCampaignCriteriaResponse response = campaignCriterionServiceClient.mutateCampaignCriteria( Long.toString(customerId), ops); } return campaignResourceName;}
Device.Enum is imported from com.google.ads.googleads.v1.enums.DeviceEnum.
Any suggestions for this issue? Could someone provide an example of this being done correctly?
Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
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 adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/479749f2-a116-4e8f-ae60-802ec64df624%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Vinutha,
Issue hasn't been resolved yet. To further investigate this, could you provide the complete JSON request and response logs when you encountered the error? If you haven't enabled logging yet, you could refer to the README section of your client library for detailed instructions on how to enable it. Please use the reply privately to authoroption.
Regards,
Dave
Google Ads API Team