Audience delete not working

19 views
Skip to first unread message

dsolution manager

unread,
Apr 2, 2018, 9:58:23 AM4/2/18
to AdWords API Forum
Hi Team,

When I delete an Audience from Google AdWords (https://adwords.google.com/) UI, the audience gets deleted and can't be further searched on the UI, but I can see that very audience being returned when I make an API call to fetch all the audiences, the status of this audience is still OPEN.

Please find the code below to fetch the audiences, I am using 3.10.0 version of adwords jars.

      public static void main(String[] args) throws ValidationException, OAuthException, RemoteException {

Credential credential = new OfflineCredentials.Builder().forApi(OfflineCredentials.Api.ADWORDS)
.withClientSecrets("", "")
.withRefreshToken("").build().generateCredential();

AdWordsSession adWordsSession = new AdWordsSession.Builder().withDeveloperToken("")
.withUserAgent("").withClientCustomerId("").withOAuth2Credential(credential).enablePartialFailure()
.build();

AdwordsUserListServiceInterface aa = new AdWordsServices().get(adWordsSession, AdwordsUserListServiceInterface.class);
SelectorBuilder builder = new SelectorBuilder();
Selector selector = builder.fields("Id", "Name", "Size", "SizeForSearch", "Status").equals("ListType", UserListType._CRM_BASED).build();

UserListPage userListPage = aa.get(selector);
System.out.println(userListPage.getTotalNumEntries());
for(UserList userList : userListPage.getEntries()){
System.out.println(userList.getName() + ","+userList.getId()+","+userList.getStatus());
}
}


Bharani Cherukuri (AdWords API Team)

unread,
Apr 2, 2018, 2:50:44 PM4/2/18
to AdWords API Forum
Hello, 

Could you share us the complete SOAP request and response logs along with the client customer Id so I can take a look? Please use Reply privately to author option to share the details. 

Regards,
Bharani, AdWords API Team
Reply all
Reply to author
Forward
0 new messages