Hey there, It took bit of time to understand how to set it up, but in future it will be helpful for others who try doing it. Note the name Id needs to have uppercase I and same with Name it needs to have uppercase N, which is pretty strange because you do not need when adding it.
Read : https://developers.google.com/adwords/api/docs/reference/v201809/AdwordsUserListService.Selector <- Under fields, all the possible fields available. user_list_selector = client.GetService('AdwordsUserListService', 'v201809') CustomerServiceSelector = { 'fields': ['Id'], "predicates": [{ "field": 'Name', "operator": "EQUALS", "values": ["Your_custom_audience_name"] }], } result = user_list_selector.get(CustomerServiceSelector) entries = result['entries'] id_of_audience = entries[0]['id'] print(id_of_audience) Best Regards, Akash On Saturday, April 6, 2019 at 6:02:29 AM UTC+11, fco wrote: > > Hello, > > I'm having trouble finding the information I need to retrieve a listid > from AdwordsUserList Service. I see how to create a new list and retrieve > the id as shown, below: > > user_list = { > 'xsi_type': 'CrmBasedUserList', > 'name': audience_name + ' ' + str(uuid.uuid4()), > 'description': 'A list of customers that originated from email addresses', > 'membershipLifeSpan': 10000, > 'uploadKeyType': 'CONTACT_INFO' > } > > # Create an operation to add the user list. > operations = [{ > 'operator': 'ADD', > 'operand': user_list > }] > > result = self.user_list_service.mutate(operations) > user_list_id = result['value'][0]['id'] > > > > But if I already have a list and only want to retrieve the user_list_id of > an existing list, how do I do that? > > Thanks > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 "AdWords API and Google Ads 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/cd634c57-e330-487e-bde2-180d5621b70bo%40googlegroups.com.