Auto Sign Document

There are 2 option for auto signing.

  • Sign with 2 factor authentication : User’s authentication code is required to be part of the data object.
  • Signing without 2 factor authentication: This does not require user authentication code. Signing Cloud assume that the application will handle user verification before this API is call.

Signing with 2 factor authentication

Sequence for calling auto signing with 2FA API

Signing without 2 factor authentication

Sequence for calling auto signing API

Source Code Sample

JSONObject jsonData = new JSONObject();
JSONObject signinfo1 = new JSONObject();

signinfo1.put("email", email);
signinfo1.put("signkeyword", signkeyword);
//if with 2FA method
//signinfo1.put("verifycode", verifycode);     

jsonData.put("signerInfo", signinfo1);
jsonData.put("contractnum", contractnum);
jsonData.put("callUrl", callUrl);

data = Hex.encodeHexString(Utils.aesEcbPkcs5PaddingEncrypt(jsonData.toString(), apiSecret));
mac = Utils.calculateMac(data, apiSecret);
Sample code to prepare raw data object for sign document automatically

Request Body Creation

{
	" signerInfo": {
	     "email":"test@gmail.com",
    	     "signkeyword":"sign here"
          },
	"contractnum":"D95BAF6106B0FE7E4A60DD7E29DA77AC",
	"callUrl":""
}

Example of Request

https://<domain>/signserver/v1/contract/signature/automatic?accesstoken=1f710ee6-b2ba-4aa4-b07b-538f472e&data=71dc5c5d3b8d22178acf393334400325c5ec5a6a4f21352ef5dbb5eadd96ae1d1e4872ced6d1f2e5713af034a1c540698ee0de817ac1057ae2cf452c06d5fc482554f6&mac=bb69344c93082a44d4588a3f84b96b7ac9e94cab9

Expected Response

{
	"result": 0,
	"message": "Success"
}

For error code, please refer to status code page.

{"result":96}

API reference : Auto Signature

API reference : Send Authentication code

How can we help?