Hi Niko, Thank you for the sample code you provided for other users. For the benefit of others with the same concern, below is some of the details of our conversation :
*Niko* : "*Just to confirm:* *1. There is no way to retrieve ids and names of all user lists that we already created manually?* *2. Can we delete the members and insert the new ones or we should always delete the list and create a new one?"* *Peter* : "*1. For getting your UserLists, you can do so by using the AdwordsUserListService.get() <https://developers.google.com/adwords/api/docs/reference/v201806/AdwordsUserListService#get>. The list that you would not be able to retrieve via the AdWords API would be the list of Members.* *2. Updating the list of members by just adding or removing items from an existing list is not supported. You would need to REMOVE the entire list of members and then re-ADD them using the AdwordsUserListService.mutateMembers() <https://developers.google.com/adwords/api/docs/reference/v201806/AdwordsUserListService#mutatemembers> method."* *Niko* : "*Thanks a lot, i will pass this to the people managing the implementation of this.* *Actually i wrote some code for retrieving user lists in AddCrmBasedUserList.php example:Pasting the code bellow inside the runExample() method will print the user lists:* * $userListService = $adWordsServices->get($session, AdwordsUserListService::class);* * $selector = new Selector();* * $selector->setFields(['Id']);* * $selector->setPaging(new Paging(0, 500));* * $res = $userListService->get($selector);* * $res = $res->getEntries();* * foreach ($res as $key => $value) {* * echo $value->getId() . ': ' . $value->getName() . PHP_EOL;* * }* *I am sending it if someone else ask the same.* *Have a nice day.*" Best regards, Peter AdWords API Team -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/e62ef7a7-1e8c-4b40-933f-de56898b33d1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.