Context: Using Ruby on Rails with google-ads-googleads gem (v.12.0.1) Trying to add a combined audience segment to a standard display campaign - which works just fine via the google ads manager, but when trying to do it programmatically, I bump into the following error:
The human readable version: ERROR IN CREATING GOOGLE CAMPAIGN: operations[0] > create[0] > combined_audience[0] with value: DISPLAY(DISPLAY_STANDARD) because the operation is not allowed for the given context. The full error object: <Google::Ads::GoogleAds::V8::Errors::GoogleAdsError: error_code: <Google::Ads::GoogleAds::V8::Errors::ErrorCode: context_error: :OPERATION_NOT_PERMITTED_FOR_CONTEXT>, message: "The operation is not allowed for the given context.", trigger: <Google::Ads::GoogleAds::V8::Common::Value: string_value: "DISPLAY(DISPLAY_STANDARD)">, location: <Google::Ads::GoogleAds::V8::Errors::ErrorLocation: field_path_elements: [<Google::Ads::GoogleAds::V8::Errors::ErrorLocation::FieldPathElement: field_name: "operations", index: 0>, <Google::Ads::GoogleAds::V8::Errors::ErrorLocation::FieldPathElement: field_name: "create">, <Google::Ads::GoogleAds::V8::Errors::ErrorLocation::FieldPathElement: field_name: "combined_audience">]>> For more context, the code used to add the campaign criterion: audience = client.operation.create_resource.campaign_criterion do |criterion| criterion.campaign = client.path.campaign(customer_id, campaign_id) criterion.combined_audience = client.resource.combined_audience_info do |audience| audience.combined_audience = audience_resource_name end end response = criteria_service.mutate_campaign_criteria( customer_id: customer_id, operations: operations, partial_failure: true ) Thanks in advance for any help here -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/7915ec26-0c63-47b8-b5b7-1fea206994fan%40googlegroups.com.