Add existing custom interest to the ad group

17 views
Skip to first unread message

Qi Yang

unread,
Feb 4, 2022, 3:32:33 PM2/4/22
to Google Ads API and AdWords API Forum
when executing following code
ad_group_service = client.get_service("AdGroupService")
ad_group_criterion_service = client.get_service("AdGroupCriterionService")
ad_group_resource_name = ad_group_service.ad_group_path(
    customer_id, ad_group_id
)
operation = client.get_type("AdGroupCriterionOperation")
affinity = operation.create
affinity.ad_group = ad_group_resource_name
affinity.user_list.user_list = "customers/CUSTOMER_ID/userLists/UserListCriterionID"
operations = []
operations.append(operation)
ad_group_criterion_response = (
            ad_group_criterion_service.mutate_ad_group_criteria(
                customer_id=customer_id,
                operations=operations,
            )
        )
I got the following error:
Request made: ClientCustomerId: CUSTOMER_ID  , Host: googleads.googleapis.com, Method: /google.ads.googleads.v8.services.AdGroupCriterionService/MutateAdGroupCriteria, RequestId: ZnE9QqL8OpziN1nRTz_Quw, IsFault: True, FaultMessage: Resource was not found.

I have double-checked the CUSTOMER_ID, ad_group_id, and UserListCriterionID, they are matched. Could you help to check this error?

Google Ads API Forum Advisor

unread,
Feb 7, 2022, 12:19:46 AM2/7/22
to diuiby...@gmail.com, adwor...@googlegroups.com

Hi,

Thanks for reaching out to the Google Ads API Forum.

Could you provide us with the complete request and response logs with the request-id, so our team can better check?

For the Python client library, logging can be enabled by navigating to the Client libraries > Your client library (Select Python) > Logging documentation, which you can access from this link. You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W4U4q:ref
Reply all
Reply to author
Forward
0 new messages