How to identify sessionUser from JSON response payload via Rest API
Tuesday, June 27, 2017 at 09:29amHello,
Our team has started the integration with eSignLive REST API to create and send packages, sign the documents and get response payload from callback listener. We have a question regarding the sessionUser.
After we created and sent a package using the url as https://sandbox.esignlive.com/api/packages, we were able to get a packageId from the response. The sample JSON content we passed in the request is like below:
{ "roles":[ { "locked":false, "emailMessage":{ "content":"" }, "attachmentRequirements":[ ], "reassign":false, "specialTypes":[ ], "id":"Signer", "data":null, "type":"SIGNER", "index":0, "signers":[ { "auth":{ "challenges":[ ], "scheme":"NONE" }, "company":"", "firstName":"John", "lastName":"Smith", "phone":"", "email":"[email protected]", "knowledgeBasedAuthentication":null, "language":"en", "title":"", "external":null, "professionalIdentityFields":[ ], "userCustomFields":[ ], "delivery":{ "email":false, "provider":false, "download":false }, "group":null, "id":"12345", "signature":null, "address":null, "data":null, "name":"", "specialTypes":[ ] } ], "name":"Signer" } ], "documents":[ { "approvals":[ { "role":"Signer", "signed":null, "accepted":null, "data":null, "fields":[ { "page":0, "subtype":"CAPTURE", "width":276, "binding":null, "extract":false, "extractAnchor":null, "left":46, "top":358, "validation":null, "height":22, "data":null, "type":"SIGNATURE", "value":"John Smith" }, { "page":0, "subtype":"LABEL", "width":200, "binding":"{approval.signed}", "extract":false, "extractAnchor":null, "left":340, "top":358, "validation":null, "height":22, "data":null, "type":"INPUT", "value":"dd/MM/yyyy" } ], "name":"" } ], "name":"Order Agreement" } ], "name":"Thin Slice Demo Package", "type":"PACKAGE", "language":"en", "emailMessage":"", "description":"Demo Package", "autoComplete":true, "status":"SENT" }From here, we set up a signer with ID 12345 and an email address. In terms of the callback response payload, what we got is like below:
{ "@class":"com.silanis.esl.packages.event.ESLProcessEvent", "name":"SIGNER_COMPLETE", "sessionUser":"b5eb623e-2e3f-495a-82c0-810cf7e764dc", "packageId":"yHOL1TGWL9UmX20NTe7YQ9V6ASY=", "message":null, "documentId":null, "createdDate":"2017-06-26T19:12:17.563Z" }There's no way for use to identify who has signed the document at this moment. So the question is how do we identify who has signed the document by using REST API not Java SDK? All the best, Eddy 27/06/2017
Reply to: How to identify sessionUser from JSON response payload via Rest API
Tuesday, June 27, 2017 at 11:36amIt looks like you need to whitelist the IP address of the sandbox environment: https://community.onespan.com/documentation/onespan-sign/guides/quick-start-guides/developer/environment-urls-ip-addresses#aanchor88 And to your second question, you only really need to make a second call if you don't set any signer id. Since you are setting a signer id, you can keep track of that in your code since you already know who sessionUser 12345 is. Therefore, you don't need to make a GET call.
Reply to: How to identify sessionUser from JSON response payload via Rest API
Tuesday, June 27, 2017 at 10:12amGET https://sandbox.esignlive.com/api/packages/yHOL1TGWL9UmX20NTe7YQ9V6ASY=
, you will see that the sessionUser is the same as the signer id for signer 'univeris test'.Reply to: How to identify sessionUser from JSON response payload via Rest API
Tuesday, June 27, 2017 at 11:07amReply to: How to identify sessionUser from JSON response payload via Rest API
Wednesday, June 28, 2017 at 04:34amReply to: How to identify sessionUser from JSON response payload via Rest API
Wednesday, June 28, 2017 at 08:28amReply to: How to identify sessionUser from JSON response payload via Rest API
Wednesday, June 28, 2017 at 08:51amReply to: How to identify sessionUser from JSON response payload via Rest API
Wednesday, June 28, 2017 at 09:24amReply to: How to identify sessionUser from JSON response payload via Rest API
Wednesday, June 28, 2017 at 11:42amGET https://sandbox.esignlive.com/api/packages/{packageId}/roles
Reply to: How to identify sessionUser from JSON response payload via Rest API
Thursday, June 29, 2017 at 07:19amReply to: How to identify sessionUser from JSON response payload via Rest API
Thursday, June 29, 2017 at 08:06amReply to: How to identify sessionUser from JSON response payload via Rest API
Friday, June 30, 2017 at 03:28am