Hello, I want to add keywords at the campaign level and not the ad_group 
level, but I'm running into trouble. Below is a sample of my error.

campaign_service = client.GetService('CampaignCriterionService', 
version='v201809')

operations = [{'operator': 'ADD',
  'operand': {'criterion': {'matchType': 'BROAD',
    'text': 'this is a keyword',
    'xsi_type': 'Keyword'},
   'campaignId': xxxxxxxxxxx}}]

campaign_service.mutate(operations)


Error:
GoogleAdsServerFault: [CriterionError.CANNOT_ADD_CRITERIA_TYPE @ 
operations[0].operand.criterion]

API DOCS:
https://developers.google.com/adwords/api/docs/reference/v201809/CampaignCriterionService
CANNOT_ADD_CRITERIA_TYPECriteria type can not be targeted.


The error states that I cannot add this criterion type, but I feel like I'm 
doing something wrong. Can anyone point me in the right direction?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/769664bc-ec80-43d6-b670-19b3379ecd6c%40googlegroups.com.

Reply via email to