I am reaching out to seek clarification and assistance regarding an issue I encountered while attempting to remove Ad Assets from a Campaign or AdGroup using the Google Ads API.
Following the official documentation, I tried using both AdGroupAdOperation and AdGroupAssetOperation to remove the specified assets. However, both attempts resulted in a RESOURCE_NOT_FOUND error. Below are the details of my API calls: *ClientCustomerId:* 5054672388 *AdGroupId:* 172792091219 *AssetId:* 187901457817 *FieldType:* YOUTUBE_VIDEO 1. Attempt with AdGroupAdOperation *Request:* def update_adgroup_status_to_paused(self, client, customer_id): ad_group_ad_service = client.get_service("AdGroupAdService") ad_group_ad_operation = client.get_type("AdGroupAdOperation") ad_group_id = "172792091219" ad_id = "187901457817" resource_name = f"customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}" ad_group_ad_operation.remove = resource_name response = ad_group_ad_service.mutate_ad_group_ads( customer_id=customer_id, operations=[ad_group_ad_operation] ) *Response:* Request made: ClientCustomerId: 5054672388, Host: googleads.googleapis.com, Method: /google.ads.googleads.v18.services.AdGroupAdService/MutateAdGroupAds, RequestId: aUd6GAmZA1PnVD7K1Ks8kA, IsFault: True, FaultMessage: Resource was not found. google.ads.googleads.errors.GoogleAdsException: (<_InactiveRpcError of RPC that terminated with: status = StatusCode.INVALID_ARGUMENT details = "Request contains an invalid argument." debug_error_string = "UNKNOWN:Error received from peer ipv4: 142.251.170.95:443 {created_time:"2025-01-14T08:57:27.755461+09:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}" >, <_InactiveRpcError of RPC that terminated with: status = StatusCode.INVALID_ARGUMENT details = "Request contains an invalid argument." debug_error_string = "UNKNOWN:Error received from peer ipv4: 142.251.170.95:443 {created_time:"2025-01-14T08:57:27.755461+09:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}" >, errors { error_code { mutate_error: RESOURCE_NOT_FOUND } message: "Resource was not found." location { field_path_elements { field_name: "operations" index: 0 } } } ------------------------------ 2. Attempt with AdGroupAssetOperation *Request:* def update_adgroup_status_to_paused(self, client, customer_id, ad_group_id): ad_group_asset_service = client.get_service("AdGroupAssetService") ad_group_asset_operation = client.get_type("AdGroupAssetOperation") ad_group_id = "172792091219" asset_id = "187901457817" field_type = "YOUTUBE_VIDEO" resource_name = f"customers/{customer_id}/adGroupAssets/{ad_group_id}~{asset_id}~{field_type}" ad_group_asset_operation.remove = resource_name ad_group_asset_response = ad_group_asset_service.mutate_ad_group_assets( customer_id=customer_id, operations=[ad_group_asset_operation] ) *Response:* Request made: ClientCustomerId: 5054672388, Host: googleads.googleapis.com, Method: /google.ads.googleads.v18.services.AdGroupAssetService/MutateAdGroupAssets, RequestId: P20Be_mQX17uAHateENK1w, IsFault: True, FaultMessage: Resource was not found. google.ads.googleads.errors.GoogleAdsException: (<_InactiveRpcError of RPC that terminated with: status = StatusCode.INVALID_ARGUMENT details = "Request contains an invalid argument." debug_error_string = "UNKNOWN:Error received from peer ipv4: 142.250.157.95:443 {created_time:"2025-01-14T08:58:06.532124+09:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}" >, <_InactiveRpcError of RPC that terminated with: status = StatusCode.INVALID_ARGUMENT details = "Request contains an invalid argument." debug_error_string = "UNKNOWN:Error received from peer ipv4: 142.250.157.95:443 {created_time:"2025-01-14T08:58:06.532124+09:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}" >, errors { error_code { mutate_error: RESOURCE_NOT_FOUND } message: "Resource was not found." trigger { string_value: "172792091219, 187901457817, YOU_TUBE_VIDEO" } location { field_path_elements { field_name: "operations" index: 0 } } } ------------------------------ Despite specifying a valid AdGroupId, AssetId, and FieldType, I continue to encounter the error. I would like to confirm: 1. Whether removing Ad Assets from a Campaign or AdGroup is supported by the Google Ads API. 2. If supported, whether the provided resource_name format is correct. 3. Any suggestions or steps I may have missed in configuring the request. I appreciate your time and assistance in resolving this issue. Best regards, Tae Soo Kim 2025년 1월 14일 화요일 오전 2시 54분 51초 UTC+9에 Google Ads API Forum Advisor님이 작성: > Hi Taesoo, > > Could you please tell us what type of ad you are trying to create? If > possible, share the customer ID, ad group Id and asset Id. > > Also, the provided resource name is invalid and has the wrong format. > > If you're trying to remove ad group ad assets, try the below request: > > > "operations": [ > { > "remove": "customers/{customerId}/adGroupAds/{adGroupId}~{ad_id}" > } > ] > > Similarly, to remove the ad group asset, you may try the below request: > > > "operations": [ > { > "remove": > "customers/{customerId}/adGroupAssets/{adGroupId}{asset_id}{fieldType}" > } > ] > > For more details, you may check AdGroupAdOperation > <https://developers.google.com/google-ads/api/rest/reference/rest/v18/AdGroupAdOperation#:~:text=valid%20resource%20name.-,remove,-string> > > and AdGroupAssetOperation > <https://developers.google.com/google-ads/api/rest/reference/rest/v18/AdGroupAssetOperation#:~:text=valid%20resource%20name.-,remove,-string> > > documents. I request you kindly follow the above given solutions and get > back to us with the requested information if you still face any issues. > > You can send the details via *Reply privately to the author option*, or > *direct > private reply* to this email. > > This message is in relation to case > "ref:!00D1U01174p.!5004Q02vGvYR:ref" (ADR-00284222) > > Thanks, > > [image: Google Logo] Google Ads API Team > Feedback > How was our support today? > > [image: rating1] > <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=1&entry.295079254=5004Q00002vGvYR> > > [image: rating2] > <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=2&entry.295079254=5004Q00002vGvYR> > > [image: rating3] > <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=3&entry.295079254=5004Q00002vGvYR> > > [image: rating4] > <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/formResponse?usp=pp_url&entry.141427034=4&entry.295079254=5004Q00002vGvYR> > > [image: rating5] > <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/formResponse?usp=pp_url&entry.141427034=5&entry.295079254=5004Q00002vGvYR> > > > > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 visit https://groups.google.com/d/msgid/adwords-api/55a7a475-cdd9-4318-9043-7c5fa9447710n%40googlegroups.com.