User Management

ValidSign provides you with the ability to add users to your account, allowing them to create and send transactions for digital signing .

As an account owner, you will have access to the transactions created by your users. However you can only retrieve these transactions using SDKs or APIs. If you want to access these transactions using the Web UI you will need your users to delegate access to you.

Manage your ValidSign Users

Finding Users in the UI

First, locate your senders in the ValidSign Web UI. To do this, log into your ValidSign account and click Admin > Users. After running your code, all your users will appear here.

Adding Users

To add a user to your account, you will need to build an Account Member object. Then, you can all on your ValidSign Account Service to send an invitation to the user. Once a new user has been invited to join an account, they are automatically added to the account, but in an inactive state. The user will receive an email containing a link that they will need to click to activate their account.

POST /api/account/senders

{
   "email" : "john.smith@example.com",
   "firstName" : "John",
   "lastName" : "Smith",
   "company" : "ABC Accountants",
   "title" : "CEO",
   "status" : "ACTIVE"
}
AccountMember member = AccountMemberBuilder.newAccountMember("john.smith@example.com ")
				.withFirstName("John")
				.withLastName("Smith")
				.withCompany("ABC Accountants")
				.withTitle("CEO")
				.withStatus(SenderStatus.ACTIVE)
				.build();
		
client.getAccountService().inviteUser(member);
AccountMember member = AccountMemberBuilder.NewAccountMember("john.smith@example.com")
				.WithFirstName("John")
				.WithLastName("Smith")
				.WithCompany("ABC Accountants")
				.WithTitle("CEO")
				.WithStatus(SenderStatus.ACTIVE)
				.Build();
		
client.AccountService.InviteUser(member);
Retrieving Users

To retrieve a list of users from your ValidSign account, check the example code below.

GET /api/account/senders?from=0&to=1
int i = 1;
Map accountMembers = client.getAccountService().getSenders(Direction.ASCENDING, new PageRequest(i,5));
		
while(!accountMembers.isEmpty()) {
for (Map.Entry entry : accountMembers.entrySet()) {
		String email = (String) entry.getKey();
		Sender sender = (Sender) entry.getValue();
		System.out.println(email + ", " + sender.getId());
		i++;
				}
accountMembers =  client.getAccountService().getSenders(Direction.ASCENDING, new PageRequest(i,5));
}
int i = 1;
IDictionary accountMembers = client.AccountService.GetSenders(Direction.ASCENDING, new PageRequest(i, 5));
        while (accountMembers.Count != 0)
        {
            foreach (var s in accountMembers)
            {
                string email = s.Key.ToString();
                string id = s.Value.Id;
                Debug.WriteLine(email + " " + id);
                i++;
            }
            accountMembers = client.AccountService.GetSenders(Direction.ASCENDING, new PageRequest(i, 5));
        }
Updating a User

To update a user you will need their user ID. Note that an email address cannot be updated once you’ve created your user. To change an email address you will need to create a new user.

POST/api/account/senders/{senderId}

{
    "firstName" : "John",
    "lastName" : "Smith",
    "company" : "XYZ Accountants",
    "title" : "CEO",
}
SenderInfo updatedSenderInfo = SenderInfoBuilder.newSenderInfo("john.smith@example.com")
     .withName( "John", "Smith" )
     .withTitle( "CEO" )
     .withCompany("XYZ Accountants")
     .build();
 
client.getAccountService().updateSender(updatedSenderInfo, "{senderId}");
SenderInfo updatedSenderInfo = SenderInfoBuilder.NewSenderInfo("john.smith@example.com")
     .WithName( "John", "Smith" )
     .WithTitle( "CEO" )
     .WithCompany("XYZ Accountants")
     .Build();
 
client.AccountService.UpdateSender(updatedSenderInfo, "{senderId}");
Deleting a User

To delete a user you will need their user ID. Here is some sample code that describes how to do this.

If your user has transactions already in their Inbox, or transactions in a Draft status, the user will be locked instead of deleted. They will not be able to create or send any other transactions.

DELETE /api/account/senders/{senderId}
client.getAccountService().deleteSender("{senderId}");
client.AccountService.DeleteSender("{senderId}");
Retrieving a Specific User

The following sample code helps you retrieve a specific user from an account.

GET /api/account/senders/{senderId}
Sender retrievedSender = eslClient.AccountService.GetSender("senderId");
Sender retrievedSender = eslClient.AccountService.GetSender("senderId");