On trying to upload a user to google ads API I am getting the error as 
collection_size_error: TOO_MANY. I am using the following code snippet to 
upload users to the audience created in google ads API.

Set userList; //userList contains the hashed email of the user that i want 
to upload to the audience
List<UserDataOperation> userDataOperations = new 
ArrayList<>(userList.size()); for (String user : userList) { 
UserDataOperation userDataOperationEmail = 
UserDataOperation.newBuilder().setCreate( UserData.newBuilder() 
.addUserIdentifiers(UserIdentifier.newBuilder().setHashedEmail(user).build()) 
.build()).build(); userDataOperations.add(userDataOperationEmail); } 
UploadUserDataRequest.Builder uploadUserDataRequest = 
UploadUserDataRequest.newBuilder().setCustomerId(clientCustomerId) 
.setCustomerMatchUserListMetadata( 
CustomerMatchUserListMetadata.newBuilder().setUserList(resourceName).build()); 
uploadUserDataRequest.addAllOperations(userDataOperations); try 
(UserDataServiceClient userDataServiceClient = 
googleAdsClient.getLatestVersion() .createUserDataServiceClient()) { 
response = 
userDataServiceClient.uploadUserData(uploadUserDataRequest.build()); }

What I have observed is that if my userList contain more then 10 values 
than I get this error.
Thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/552860bf-690f-4aee-ab5a-d585b288c888n%40googlegroups.com.
  • co... Ajit Trivedi
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Ajit Trivedi

Reply via email to