Hi !
Using the API, create CrmBasedUserList & add email address.
Processing will succeed but the status will not be updated. Tens of hours.
I saw this page and made it.
https://developers.google.com/adwords/api/docs/samples/java/remarketing

Is there anything wrong?

best regards.

[code]

    public void sendEmailAddresses(String refreshToken, String customerId, 
String userListId, List<String> emails) throws GoogleException {
        try {
            MutateMembersOperand operand = new MutateMembersOperand();
            operand.setUserListId(Long.valueOf(userListId));
            operand.setDataType(MutateMembersOperandDataType.EMAIL_SHA256);
            operand.setMembers(emails.stream().map(s -> 
getSha256(s.trim().toLowerCase())).collect(Collectors.toList()).toArray(new 
String[emails.size()]));

            MutateMembersOperation operation = new MutateMembersOperation();
            operation.setOperand(operand);
            operation.setOperator(Operator.ADD);

            AdwordsUserListServiceInterface userListService = 
getUserListService(refreshToken, customerId);

            userListService.mutateMembers(new 
MutateMembersOperation[]{operation});
        } catch (RemoteException e) {
            logger.error("cannot send emais error={}", e);
            throw new GoogleException(e);
        }
    }

    public static String getSha256(String target) {
        MessageDigest md = null;
        StringBuffer buf = new StringBuffer();
        try {
            md = MessageDigest.getInstance("SHA-256");
            md.update(target.getBytes());
            byte[] digest = md.digest();

            for (int i = 0; i < digest.length; i++) {
                buf.append(String.format("%02x", digest[i]));
            }

        } catch (NoSuchAlgorithmException e) {
            new RuntimeException(e);
        }

        return buf.toString();
    }

[screen] of Japanese(sorry)

<https://lh3.googleusercontent.com/-OnwKJGcRcRY/WLWaGtnq--I/AAAAAAAAA8g/AcPs54OEiQUGOXYiAjf30vnK2yhrmVJbQCLcB/s1600/%25E3%2582%25A2%25E3%2582%25AB%25E3%2582%25A6%25E3%2583%25B3%25E3%2583%2588.jpg>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 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/5e70deee-032d-4e71-b547-735bb60ed4b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • The status of ... 竹田祥
    • Re: The s... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
      • Re: T... 竹田祥
      • Re: T... 竹田祥
        • R... 'Nadine Sundquist (AdWords API Team)' via AdWords API Forum
          • ... 竹田祥
            • ... 'Nadine Sundquist (AdWords API Team)' via AdWords API Forum
              • ... 竹田祥
                • ... 'Nadine Sundquist (AdWords API Team)' via AdWords API Forum
                • ... 竹田祥
                • ... 竹田祥

Reply via email to