signInBatch
Overview
Parameters:
Return:
String - success
Exception - failure
To sign in batch we need:
set your api token.
set your user token.
set your signers token.
set your SignInBatch class.
call the method.
Usage:
Import the relevant components:
import body.signer.SignBatch;
import signers.SignerRequest;
import java.util.ArrayList;
Set your Api Token:
String apiToken = "YOUR TOKEN";
set your user token, (where to find)
String userToken = "USER TOKEN";
Salve o token de seus signatários
String signer_token1 = "SIGNER TOKEN 1";
String signer_token2 = "SIGNER TOKEN 2";
ArrayList<String> signers_token = new ArrayList<>();
signers_token.add(signer_token1);
signers_token.add(signer_token2);
Set your SignInBatch class:
SignBatch signBatch = SignBatch.builder()
.user_token(userToken)
.signer_tokens(signers_token)
.build();
Call the method signInBatch and receive as a response a string containing a success message or an error message:
try {
Signer signerResponse = new SignerRequest(apiToken).updateSigner(signerToken, signer);
String jsonDocResponse = new JsonConverter().signerToJson(signerResponse);
System.out.println(jsonDocResponse);
}
catch(Exception exceptionError) {
System.out.println(exceptionError.getMessage());
}
Example:
import body.signer.SignBatch;
import signers.SignerRequest;
import java.util.ArrayList;
public class SignInBatch {
public static void main(String[] args) throws Exception {
String apiToken = "YOUR TOKEN";
String userToken = "USER TOKEN";
String signer_token1 = "SIGNER TOKEN 1";
String signer_token2 = "SIGNER TOKEN 2";
ArrayList<String> signers_token = new ArrayList<>();
signers_token.add(signer_token1);
signers_token.add(signer_token2);
SignBatch signBatch = SignBatch.builder()
.user_token(userToken)
.signer_tokens(signers_token)
.build();
try {
String response = new SignerRequest(apiToken).signInBatch(signBatch);
System.out.println(response);
}
catch(Exception exceptionError) {
System.out.println(exceptionError.getMessage());
}
}
}
Last updated
Was this helpful?