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());
        }
    }



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
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/832ed8ad-c802-4088-b42a-826166823641%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Audience dele... dsolution manager
    • Re: Audi... 'Bharani Cherukuri (AdWords API Team)' via AdWords API Forum

Reply via email to