Adding customer match ids to an existing user list (python)

202 views
Skip to first unread message

Stephen Waters

unread,
Feb 17, 2021, 11:36:38 AM2/17/21
to AdWords API and Google Ads API Forum
Hi

I am in the process of migrating to the google ads api from the adwords one.

I've been using the code from https://github.com/googleads/google-ads-python/blob/master/examples/remarketing/add_customer_match_user_list.py as a basis but am struggling to figure out how to update an existing list rather than create a new one & add customers to that.

I am imagining I need the user list resource name to feed into this function:

def _add_users_to_customer_match_user_list(client, customer_id, user_list_resource_name)

and I have been able to find this for my existing user lists using GoogleAdsService search, but when I supply this I get the error

AttributeError: Assignment not allowed to field "user_list" in protocol message object.

which I am not sure how to interpret. Any advice appreciated, cheers

Stephen

Google Ads API Forum Advisor Prod

unread,
Feb 17, 2021, 5:18:12 PM2/17/21
to adwor...@googlegroups.com

Hi Stephen,

Thank you for reaching out. You would need to pass in the resource name rather than a user list id or name. You could first create the resource name of the user list in the form of customers/{customer_id}/userLists/{user_list_id} and then pass it in the def _add_users_to_customer_match_user_list() method.

Thanks and regards,
Xiaoming, Google Ads API Team
 

Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q2CRtpQ:ref

Stephen Waters

unread,
Feb 23, 2021, 1:52:51 PM2/23/21
to AdWords API and Google Ads API Forum
Hi Xiaoming

Thanks for replying
I am unfortunately still struggling with this - I believe the resource name is what I was/am passing there?
Additionally when I run the example code from github now (which creates 1x list matching 1x email) I see "Waiting until operation completes..." & then nothing happens indefinitely - is there any way to figure out why?
Thanks

Stephen

Google Ads API Forum Advisor Prod

unread,
Feb 23, 2021, 8:15:25 PM2/23/21
to adwor...@googlegroups.com

Hi Stephen,

Thank you for reaching out. Could you please share the complete request and response logs along with the source code you used via the Reply privately to author option for us to further investigate? If it is disabled, please send the requested information directly to our alias at googleadsa...@google.com.



Thanks and regards,
Xiaoming, Google Ads API Team

 

Reply all
Reply to author
Forward
0 new messages