To add to the above, here's what happens when I try to set TARGET_ROAS using MAXIMIZE_CONVERSION_VALUE:
[2023-07-12 11:10:55 - INFO] Request ------- Method: /google.ads.googleads.v14.services.CampaignService/MutateCampaigns Host: googleads.googleapis.com Headers: { "developer-token": "REDACTED", "login-customer-id": "9126245774", "x-goog-api-client": "gl-python/3.11.4 grpc/1.54.2 gax/2.11.0 gccl/21.2.0 pb/4.23.2", "x-goog-request-params": "customer_id=2371697191" } Request: customer_id: "2371697191" operations { update_mask { paths: "resource_name" paths: "app_campaign_setting.bidding_strategy_goal_type" paths: "maximize_conversion_value.target_roas" } update { resource_name: "customers/2371697191/campaigns/14304399031" app_campaign_setting { bidding_strategy_goal_type: OPTIMIZE_INSTALLS_TARGET_INSTALL_COST } maximize_conversion_value { target_roas: 1.6 } } } Response ------- Headers: { "google.ads.googleads.v14.errors.googleadsfailure-bin": "\n\u0001\n\u0003\u0003\u0002\u00123The operation is not allowed for the given context.\u001a\u001f*\u001dMULTIPLE(MULTIPLE_MOBILE_APP)\"F\u0012\u000e\n\noperations\u0018\u0000\u0012\b\n\u0006update\u0012\u001b\n\u0019maximize_conversion_value\u0012\r\n\u000btarget_roas\u0012\u0016DbKcNtVnq1oOm8U_T8JyBA", "grpc-status-details-bin": "\b\u0003\u0012%Request contains an invalid argument.\u001a\u0002\nDtype.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure\u0012\u0001\n\u0001\n\u0003\u0003\u0002\u00123The operation is not allowed for the given context.\u001a\u001f*\u001dMULTIPLE(MULTIPLE_MOBILE_APP)\"F\u0012\u000e\n\noperations\u0018\u0000\u0012\b\n\u0006update\u0012\u001b\n\u0019maximize_conversion_value\u0012\r\n\u000btarget_roas\u0012\u0016DbKcNtVnq1oOm8U_T8JyBA", "request-id": "DbKcNtVnq1oOm8U_T8JyBA" } Fault: errors { error_code { context_error: OPERATION_NOT_PERMITTED_FOR_CONTEXT } message: "The operation is not allowed for the given context." trigger { string_value: "MULTIPLE(MULTIPLE_MOBILE_APP)" } location { field_path_elements { field_name: "operations" index: 0 } field_path_elements { field_name: "update" } field_path_elements { field_name: "maximize_conversion_value" } field_path_elements { field_name: "target_roas" } } } request_id: "DbKcNtVnq1oOm8U_T8JyBA" On Wednesday, July 12, 2023 at 1:32:58 PM UTC+3 Adrian Lazar wrote: > Hello, > > I've been struggling to integrate API Bidding Updates (Mutates) for > Campaigns and AdGroups. > > Library used: Google Ads API Python Client Library > <https://github.com/googleads/google-ads-python> > Version: *21.2.0* > > Currently, I've only managed to get working API Bidding Updates (Mutates) > for Campaigns using TARGET_ROAS and TARGET_CPA, and for AdGroups using > MANUAL_CPC, MANUAL_CPM and TARGET_CPM. > > My goal is to be able to provide API Bidding Updates (Mutates) for all the > available bidding strategies, by using the Google Ads API Python Client > Library <https://github.com/googleads/google-ads-python>. Important Note: > The only type of Campaigns that we are interested in are *App Campaigns.* > > Example of failed request (and response) for setting MANUAL_CPC for a > Campaign: > > [2023-07-12 10:24:46 - INFO] Request > ------- > Method: /google.ads.googleads.v14.services.CampaignService/MutateCampaigns > Host: googleads.googleapis.com > Headers: { > "developer-token": "REDACTED", > "login-customer-id": "9126245774 <(912)%20624-5774>", > "x-goog-api-client": "gl-python/3.11.4 grpc/1.54.2 gax/2.11.0 > gccl/21.2.0 pb/4.23.2", > "x-goog-request-params": "customer_id=2371697191" > } > Request: customer_id: "2371697191" > operations { > update_mask { > paths: "resource_name" > paths: "app_campaign_setting.bidding_strategy_goal_type" > paths: "manual_cpc.enhanced_cpc_enabled" > } > update { > resource_name: "customers/2371697191/campaigns/14304399031 > <(430)%20439-9031>" > app_campaign_setting { > bidding_strategy_goal_type: OPTIMIZE_INSTALLS_TARGET_INSTALL_COST > } > manual_cpc { > enhanced_cpc_enabled: true > } > } > } > > > Response > ------- > Headers: { > "google.ads.googleads.v14.errors.googleadsfailure-bin": > "\nr\n\u0003\u0003\u0002\u00123The operation is not allowed for the given > context.\u001a\f*\nMANUAL_CPC\"(\u0012\u000e\n\noperations\u0018\u0000\u0012\b\n\u0006update\u0012\f\n\nmanual_cpc\u0012\u0016a3jdlHwU1x1MFIYrWhixDw", > "grpc-status-details-bin": "\b\u0003\u0012%Request contains an invalid > argument.\u001a\u0001\ > nDtype.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure\u0012\u0001\nr\n\u0003\u0003\u0002\u00123The > > <http://nDtype.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure%5Cu0012%5Cu0001%5Cnr%5Cn%5Cu0003%5Cu0003%5Cu0002%5Cu00123The> > > operation is not allowed for the given > context.\u001a\f*\nMANUAL_CPC\"(\u0012\u000e\n\noperations\u0018\u0000\u0012\b\n\u0006update\u0012\f\n\nmanual_cpc\u0012\u0016a3jdlHwU1x1MFIYrWhixDw", > "request-id": "a3jdlHwU1x1MFIYrWhixDw" > } > Fault: errors { > error_code { > context_error: OPERATION_NOT_PERMITTED_FOR_CONTEXT > } > message: "The operation is not allowed for the given context." > trigger { > string_value: "MANUAL_CPC" > } > location { > field_path_elements { > field_name: "operations" > index: 0 > } > field_path_elements { > field_name: "update" > } > field_path_elements { > field_name: "manual_cpc" > } > } > } > request_id: "a3jdlHwU1x1MFIYrWhixDw" > > > The error "The operation is not allowed for the given context." is quite > generic and doesn't really provide any useful information to understand why > this operation is not allowed. The exact same error is raised for all the > other Bidding Strategies attempted. > > Thank you! -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 "Google Ads API and AdWords 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/519a3741-e66a-45a4-8bcf-f0b64c596dd5n%40googlegroups.com.