Questions about How to use Google Ads API "AdwordsUserListService"

81 views
Skip to first unread message

Su Yu

unread,
Jan 7, 2020, 3:44:31 PM1/7/20
to AdWords API and Google Ads API Forum
Hi Google Ads API,

I have some questions about how to use Google Ads API "AdwordsUserListService" endpoint to mutate members in the user list programmatically. The documentation is not clear to me and here are my questions.

Please help to clarify how to Hash email properly.
In API doc (https://developers.google.com/adwords/api/docs/reference/v201809/AdwordsUserListService.Member.html), it says say: “Hashed email address using SHA-256 hash function after normalization.” But It is unclear to me how to normalize it. I checked other AdWords related documents and I see different ways to formalize data.

Based on “Formatting guidelines for uploading hashed data” (in this link https://support.google.com/google-ads/answer/7659867?hl=en&ref_topic=6296507):
It requires:
(1) Include a domain name for all email addresses (for example, gmail.com or hotmail.co.jp)
(2) Lowercase all characters
(3) Remove any extra spaces before and after, or in between the email address

But in the sample python script ("Or if you use Python, use this script to hash your data files." provided  in this document https://support.google.com/google-ads/answer/7474166?hl=en&ref_topic=6296507)  it also requires:
Remove all the dots in part before '@'.


Please help me to clarify what are the exact rules to hash email data.

Thanks,

Google Ads API Forum Advisor Prod

unread,
Jan 8, 2020, 2:45:15 PM1/8/20
to s...@zulily.com, adwor...@googlegroups.com
Hi Su,

Thank you for reaching out. Emails should be hashed using an SHA-256 hash function. You can see this example for the Python hashing algorithm. It looks like it follows the rules outlined in this guide.

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5001UOGEe8:ref

Su Yu

unread,
Jan 8, 2020, 3:00:41 PM1/8/20
to AdWords API and Google Ads API Forum
Hi Mitchell,

Thanks for the quick response.

Seems like the format between file and API are a little bit different, but since we are using API I will follow the example and rules you suggested.

Thanks for your help.

Regards,
Reply all
Reply to author
Forward
0 new messages