1. Home
  2. Docs
  3. Guides
  4. Manage Account
  5. Upload Signature Image

Upload Signature Image

Update or add signature image of user.

Sequence Diagram

Sequence to call API for upload signature image

Source Code Sample

byte[] bImg = Utils.readBytesFromFile(img);
imgHex = Utils.bytes2HexString(bImg);
	
JSONObject jsonData = new JSONObject();
JSONObject signinfo1 = new JSONObject();
	     
signinfo1.put("email", email);
jsonData.put("img", imgHex);
jsonData.put("transparency", "0");
jsonData.put("signer", signinfo1);
	      
data = Hex.encodeHexString(Utils.aesEcbPkcs5PaddingEncrypt(jsonData.toString(),apiSecret));
mac = Utils.calculateMac(data,apiSecret);
Sample code to create raw data object for upload signature image

Request Body Creation

{
	"img": "ffd8ff….",
	"transparency": "0",
	"signer": {
		"email": "chrischang@gmail.com",
	}
}

Example of Request

/signserver/v1/user/signimg?accesstoken=d7a3ad1586084a58&data=5a899f31ce22453fadc37c1a&mac=75706f345fc7129c6eb5cb

Expected Response

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

For error code, please refer to status code page.

{"result":9} 

API reference : Upload Signature Image

How can we help?