Thanks for your feedback. this is error message: api: { "error": { "code": 400, "message": "Request contains an invalid argument.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.ads.googleads.v15.errors.GoogleAdsFailure", "errors": [ { "errorCode": { "contextError": "OPERATION_NOT_PERMITTED_FOR_CONTEXT" }, "message": "The operation is not allowed for the given context.", "location": { "fieldPathElements": [ { "fieldName": "operations", "index": 0 }, { "fieldName": "update" }, { "fieldName": "maximize_conversions" }, { "fieldName": "target_cpa_micros" } ] } } ], "requestId": "Bm2xH7-FdyitEFfHMPfBAg" } ] } }
requestId: Bm2xH7-FdyitEFfHMPfBAg When create Campaign that type is discovery and uses maximizeConversions successfully. and then I want to update this campaign's maximizeConversions,so I get this error. create request: { "partialFailure": false, "operations": [ { "create": { "name": "Campaign_name", "campaign_budget": "customers/id/campaignBudgets/id", "advertising_channel_type": "DISCOVERY", "status": "PAUSED", "selective_optimization": null, "maximize_conversions": {} } } ], "responseContentType": "MUTABLE_RESOURCE", "validateOnly": false } ======================== upadte request: { "partialFailure": false, "operations": [ { "update": { "maximizeConversions": { "targetCpaMicros": "100000" }, "resourceName": "customers/my_id/campaigns/my_id" }, "updateMask": "maximizeConversions.targetCpaMicros" } ], "responseContentType": "MUTABLE_RESOURCE", "validateOnly": true } 在2024年3月20日星期三 UTC+9 01:42:47<Google Ads API Forum Advisor> 写道: > Hi, > > Thank you for reaching out to the Google Ads API support team. > > Upon checking the provided partial logs, I found that you are trying to > create > a Demand Gen Campaign > <https://developers.google.com/google-ads/api/docs/demand-gen/create-campaign> > > via the Google Ads API, but you are getting a > CANNOT_ATTACH_BIDDING_STRATEGY_TO_CAMPAIGN > <https://developers.google.com/google-ads/api/reference/rpc/v16/BiddingErrorEnum.BiddingError#cannot_attach_bidding_strategy_to_campaign> > > error. This error is a type of OPERATION_NOT_PERMITTED_FOR_CONTEXT > <https://developers.google.com/google-ads/api/reference/rpc/v16/ContextErrorEnum.ContextError#operation_not_permitted_for_context> > > error. This error indicates that you cannot attach a bidding strategy to a > campaign. Please note that there are a few minimum requirements > <https://support.google.com/google-ads/answer/13703192> that should be > met before creating a demand-gen campaign. I also suggest you please check > the Create campaign and bidding strategy > <https://developers.google.com/google-ads/api/docs/demand-gen/create-campaign#create_campaign_and_bidding_strategy> > > documentation to know how to create a campaign and the bidding strategy. > You can also check the Bidding Strategy Types > <https://developers.google.com/google-ads/api/docs/campaigns/bidding/strategy-types> > > documentation to know the supported bidding strategies via the Google Ads > API. > > However, the provided logs are not complete as there is no request body > presented in the logs. So if the issue still persists even after following > the above documentation and minimum requirements, please provide us with > complete API logs (request > <https://developers.google.com/google-ads/api/docs/concepts/field-service#request> > > and response > <https://developers.google.com/google-ads/api/docs/concepts/field-service#response> > > with request-id > <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id> > > and request > <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>header) > > generated at your end. > > You can send the details via the *Reply** privately to the author option* > or a *direct private reply* to this email. > This message is in relation to case > "ref:!00D1U01174p.!5004Q02s03Jb:ref" (ADR-00227828) > > Thanks, > > [image: Google Logo] Google Ads API Team > > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/a69f3d1e-be0e-4f9f-a979-4cf61c1fe014n%40googlegroups.com.