wendyguo

is it possible to invite a sender via JAVA SDK?

0 votes

Hi,

Is it possible to invite a sender throught JAVA SDK? If yes, how to do it?

Thanks,

Wendy

 


Reply to: is it possible to invite a sender via JAVA SDK?

0 votes

Hi Wendy,

 

Yes, it's possible to invite senders through SDK in OneSpan Sign, with below code snippet:

AccountMember member = AccountMemberBuilder.newAccountMember("[email protected] ")
                .withFirstName("John")
                .withLastName("Smith")
                .withCompany("ABC Bank")
                .withTitle("CEO")
                .withStatus(SenderStatus.ACTIVE)
                .build();
        
client.getAccountService().inviteUser(member);

 

Also explore the "Sender" guide for more detailed explanations.

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: is it possible to invite a sender via JAVA SDK?

0 votes

Hi Wendy,

 

The status "ACTIVE" vs "INVITED" indicates the sender's status.

(1)You can choose to invite the sender directly as ACTIVE, in which case system won't send out the activation email and therefore the sender doesn't have a password to access the UI portal, but you can treat this person the same as a fully provisioned sender, from API's perspective. Afterwards, the person can click "Forget the Password" to trigger the activation process or you programmatically invoke an API to send the invitation email to the person.

(2)Inviting sender as INVITED status will follow the normal activation process: the sender status will be updated to ACTIVE after the person specified his/her password.

 

Duo

 

 

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: is it possible to invite a sender via JAVA SDK?

0 votes

Hi Wendy,

 

Sample code provided above exactly invites the sender directly as ACTIVE:


AccountMember member = AccountMemberBuilder.newAccountMember("[email protected] ")
                .withFirstName("John")
                .withLastName("Smith")
                .withCompany("ABC Bank")
                .withTitle("CEO")
                .withStatus(SenderStatus.ACTIVE)
                .build();
        
client.getAccountService().inviteUser(member);

 

And AccountService class> ".getSenders()" function allows you to retrieve senders under your account.

int i = 1;
Map<String, Sender> accountMembers = client.getAccountService().getSenders(Direction.ASCENDING, new PageRequest(i,5));
        
while (!accountMembers.isEmpty()) {
for (Map.Entry<String, Sender> entry : accountMembers.entrySet())
    {
        System.out.println(entry.getKey() + " / " + entry.getValue().getId());
        i++;
    }
accountMembers = client.getAccountService().getSenders(Direction.ASCENDING, new PageRequest(i,5));
}

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: is it possible to invite a sender via JAVA SDK?

0 votes

Thanks Duo! It help a lot.

Wendy


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