Google Ads API: creating an IpBlockInfo instance
I need to modify the blocked IP addresses for a given campaign using the Google Ads API call (version v8). I figured that to add blocked IPs to a given campaign I must create a new campaign criterion, not update an existing one, using the MutateCampaignCriterion
endpoint.
My request is
Request: customer_id: "xxxxxxxx" operations { create { ip_block { ip_address: "xxx.x.x.xx" } campaign: "customers/xxxxxxx/campaigns/xxxxxxx" } } validate_only: true
with the proper numbers instead of the x's. The error I get is
Fault: errors { error_code { criterion_error: FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING } message: "The field is not allowed to be set when the negative field is set to true, e.g. we don\'t allow bids in negative ad group or campaign criteria." location { field_path_elements { field_name: "operations" index: 0 } field_path_elements { field_name: "create" } field_path_elements { field_name: "ip_block" } } }
Even when I set the negative field to false the same occurs. I don't understand why. Any help would be appreciated, thanks!