Update existing audience through awords api

43 views
Skip to first unread message

adwordsa...@gmail.com

unread,
Feb 8, 2018, 5:14:14 PM2/8/18
to AdWords API Forum
Hi Adwords API Team,

I am performing some API actions. Creating and updating audiences using Adwords API.
I have a list of user email ids and using that values i am able to create audience in my test account using Adwords API.

But i am not finding any documentation on how to update any existing audience.

Can you please help me out here or point me to some documentation.

Thanks and Regards,
Biswajeet Sahoo

Luis Xander Talag (AdWords API Team)

unread,
Feb 9, 2018, 1:31:56 AM2/9/18
to AdWords API Forum
Hi Biswajeet,

You may use the AdwordsUserListService.mutateMembers() operation to update an existing audience. All you need to do is to get the Id of the user list that you want to update using the AdwordsuserListService.get() and then you may follow this sample code (also available in other languages) starting from this line "Long userListId = userListAdded.getId();" (userListId = YOUR_USERLISTID_TO_BE_UPDATED) to add or remove your email address. You may change the operator (mutateMembersOperation.setOperator(Operator.ADD);) to ADD or REMOVE based on your preferred operation. Take note that the SET operator is not supported in AdwordsUserListService.mutateMembers(). 

Let me know if you still need clarifications.

Thanks and regards,
Luis
AdWords API Team

adwordsa...@gmail.com

unread,
Feb 12, 2018, 7:23:09 AM2/12/18
to AdWords API Forum
Hi Luis,

Can you please point me tp some example where "All you need to do is to get the Id of the user list that you want to update using the AdwordsuserListService.get()" is performed. I am having hard time to pass the argument for "get(com.google.api.ads.adwords.axis.v201710.cm.Selector serviceSelector)".

Thanks and Regards,
Biswajeet Sahoo

Luis Xander Talag (AdWords API Team)

unread,
Feb 12, 2018, 10:19:09 PM2/12/18
to AdWords API Forum
Hi Biswajeet,

We don't have the exact example in the AdWords API guide for AdwordsuserlistService.get(). However, the implementation is pretty much the same as in this sample code in getting the campaign. Using the AdWordsUserListService, you have to change the selector field to AdwordsUserListField.Id to get the ID of the user list and you may proceed with my previous instructions.

Let me know if you still need further clarifications.

Regards,
Lius
AdWords API Team

Reply all
Reply to author
Forward
0 new messages