Dear Google Ads Support Team,

I hope this message finds you well.

I attempted to remove an Ad asset from an AdGroup using the following code:

===============================================================
def update_adgroup_status_to_paused(self, customer_id, client):
    ad_group_asset_service = client.get_service("AdGroupAssetService")
    # Create ad group operation.
    ad_group_asset_operation = client.get_type("AdGroupAssetOperation")

    ad_group_id = "ad_group_id"
    asset_id = "asset_id"
    field_type = "YOUTUBE_VIDEO"

    resource_name = 
f"customers/{customer_id}/adGroupAds/{ad_group_id}~{asset_id}~{field_type}"
    ad_group_asset_operation.remove = resource_name
    # Update the ad group.
    ad_group_asset_response = ad_group_asset_service.mutate_ad_group_ads(
        customer_id=customer_id, operations=[ad_group_asset_operation]
    )
    return ad_group_asset_response.results
====================================================================

Despite ensuring that the adgroup_id, asset_id, and field_type values are 
correct, I encountered the following error message:

==========================================
errors {
  error_code {
    mutate_error: RESOURCE_NOT_FOUND
  }
  message: "Resource was not found."
}
===========================================

Could you please confirm if it is possible to remove an AdGroupAdAsset 
using the AdGroupAssetService?

If this is not supported, could you advise on an alternative method or API 
for directly removing an AdGroupAdAsset?

Thank you for your time and assistance. I look forward to your guidance.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/4d633daa-3d03-40e0-9017-4aa971e7296cn%40googlegroups.com.

Reply via email to