How to use AdWordsUserListService on an existing campaign/adgroups

27 views
Skip to first unread message

Arnab Ganguly

unread,
Sep 5, 2019, 7:59:19 PM9/5/19
to AdWords API and Google Ads API Forum
Hello,
I want to use AdWordsUserListService  on an existing campagin,adgroups etc.I don't see it takes any of the respective ids as inputs.How do I do that.Any sample examples would be great help.

I need to use that service for inclusion of emails,zipcodes on campaign or adgroups ? Is there any other way doing it ?
TIA,
-A

Google Ads API Forum Advisor Prod

unread,
Sep 6, 2019, 8:03:13 AM9/6/19
to adwor...@googlegroups.com

Hi Arnab,

Thank you for posting your concern.

The AdwordsUserListService is used to manage user lists by using getmutate and mutateMembers methods. Please see the provided link for more details.

So I can provide proper support, could you further elaborate what you are trying to achieve using AdWords API specifically what you meant by this "I need to use that service for inclusion of emails,zipcodes on campaign or adgroups ?"?

Regards,
Hiroyuki
Google Ads API Team



ref:_00D1U1174p._5001UHFs3z:ref

Arnab Ganguly

unread,
Sep 6, 2019, 11:34:22 AM9/6/19
to AdWords API and Google Ads API Forum

I can zipcode like this 'campaignCriteria': [{'id': '21137', 'xsi_type': 'Location'}, {'id': '2484', 'xsi_type': 'Location'}

What's the use of email address.I see sha-256 hashed for email address.But not clear as how it is included in campaign.

Google Ads API Forum Advisor Prod

unread,
Sep 9, 2019, 5:00:31 AM9/9/19
to adwor...@googlegroups.com

Hi Arnab,

Thank you for clarifying your concern.

Each email of the user will be contained within the Member object and each member will become collectively as the audience of your UserList object. You will need to create one Member object per each email that you wish to include in your userlist. You may refer to the sample code snippet below (from this example, also available for other languages):

// Hash normalized email addresses based on SHA-256 hashing algorithm. 
List<Member> members = new ArrayList<>(EMAILS.size()); 
for (String email : EMAILS) 

String normalizedEmail = toNormalizedString(email); 
Member member = new Member(); 
member.setHashedEmail(toSHA256String(normalizedEmail)); 
members.add(member); 
}


I hope this helps.



Regards,
Hiroyuki
Google Ads API Team



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