1. Home
  2. Docs
  3. Guides
  4. Document Signing Flow
  5. Send Authentication Code

Send Authentication Code

Sequence to call API for send authentication code

Source Code Sample

JSONObject jsonData = new JSONObject();
JSONObject signinfo1 = new JSONObject();
signinfo1.put("phonesn",phonesn); 
signinfo1.put("email",email); 
jsonData.put("signer", signinfo1);
jsonData.put("contractnum",contractnum);
jsonData.put("type","1");
	     
data = Hex.encodeHexString(Utils.aesEcbPkcs5PaddingEncrypt(jsonData.toString(),apiSecret));
mac = Utils.calculateMac(data,apiSecret);
Sample code to prepare raw data object for sending authentication code

Request Body Creation

{
	"signer": 
        {
		"phonesn":"+60126311018",
		"email":"chrischang@gmail.com"
        },
	"contractnum":"F31445D04E0A33E6998B92112B22B3BB",
	"type":"1", 
}

Example of Request

https://<domain>/signserver/v1/contract/authcode?accesstoken=1f710ee6-b2ba-4aa4-b07b-538f472e3ff9-000027ed&data=d7319e81cf&mac=c36ac72d5d845a86a06d24d8548

Expected Response

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

For error code, please refer to status code page.

{"result":99}

API reference : Send Authentication Document

How can we help?