wendyguo

How to create a groupID via JAVA SDK?

0 votes

I'd like to know how to creae a groupID via JAVA SDK? BTW, I know how to create a groupID from sendUI.

 

Thanks,

Wendy


Reply to: How to create a groupID via JAVA SDK?

0 votes

Hi Wendy,

 

Group ID is in a format of 36 characters UUID, you can retrieve the list using below code:


List<Group> allGroups = esl.getGroupService().getMyGroups();
for ( Group group : allGroups ) {
     System.out.println( group.getName() + " with email " + group.getEmail() + " and id " + group.getId() );
     List<GroupMember> allMembers = esl.getGroupService().getGroupMembers( group.getId() );
     for ( GroupMember member : allMembers ) {
          System.out.println( member.getGroupMemberType().toString() + " " + member.getFirstName() + " " + member.getLastName() + " with email " + member.getEmail());
     }
}

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to:

0 votes

Hi Duo,

 

Thanks for you reply. I think I didn't explain my question clearly. As you know, when use notify call, we can pass in groupID. My question is How do I create a groupID via JAVA SDK and associated this groupID with a package via JAVA SDK, then use notify to send the activate email to the member os of this group via JAVA SDK?

Thanks

Wendy


Reply to: How to create a groupID via JAVA SDK?

0 votes

I see your concern. The "group" is an account level concept, that's why the group should have already been created in your account (through UI or code) before the package creation (guide here). After creation, you'll still need to use the above code to retrieve the generated group ID.

 

Duo

 

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off