Selfie Verification

Sequence to call API for Selfie Verification

Source Code Sample

byte[] sImg = Utils.readBytesFromFile(selfie);
selfieBs64 = Base64.getEncoder.encodeToString(sImg);

signinfo1.put("name",name); 
signinfo1.put("email", email);
jsonData.put("selfie", selfieBs64);
jsonData.put("signerInfo", signinfo1);

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

Request Body Creation

{
	"signerInfo":{
		"idcardnum":"830921107832",
		"name":"Lee Kim",
		"email":"leekim@gmail.com",
	},
	"selfie":"89504e470d0a1a0a0000000d494844520000012c0000012c0806000000797"
}

Example of Request

https://<domain>/signserver/v1/user/ekycimages/face?accesstoken=d7a3ad1586084a58&data=5a899f31ce22453fadc37c1a&mac=75706f345fc7129c6eb5cb

Expected Response

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

For error code, please refer to status code page.

{"result":2005}

API reference Selfie Verification

How can we help?