Reply to: Creating and Sending Packages using JavaScript
Tuesday, November 6, 2018 at 09:30am
0
votes
Hi there,
Yes! You can use OneSpan Sign REST API with NodeJs, here's a blog on this and you can find the source code using in this blog here.
Hope this could help!
Duo
Reply to: Creating and Sending Packages using JavaScript
Tuesday, November 6, 2018 at 12:18pm
0
votes
This gives me a good direction to head in but unfortunately downloading and running the code does not work.
I 'npm i' to install all the node modules, inserted my api_key, node server.js to run the server, and live-server for the front end.
Server is saying "TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string"
Reply to: Creating and Sending Packages using JavaScript
Tuesday, November 6, 2018 at 03:11pm
0
votes
Thank you Duo! That got me farther but still not working. My response body is now
body {"messageKey":"error.validation.sendPackage.noApprovals","message":"Cannot send package without approvals.","code":400,"name":"Validation Error"}
I am using the api_key I retreived from sandbox. Is this wrong?
Reply to: Creating and Sending Packages using JavaScript
Tuesday, November 6, 2018 at 04:16pm
0
votes
Hi there,
"error.validation.sendPackage.noApprovals" is an error sent from OneSpan Sign, so if you are receiving this error, it means your API key and instance endpoint are correct.
For the error, did you changed the pdf included in the folder? Because in this example, it's using Document Extraction Feature to locate all approvals, it seems that OneSpan Sign can't find the automated injected fields in your pdf.
Duo
Reply to: Creating and Sending Packages using JavaScript
Wednesday, November 7, 2018 at 07:47am
0
votes
Hi nweese,
For first question. Sure, the example only gives you an idea of how the whole process works with OneSpan Sign. To customize your pdf, and to locate your fields/approvals, you can use following extraction ways:
1.Document Extraction
Use PDF forms to tell OneSpan Sign where and what the size you want your field(signature field/date field/text field, etc) to be on the document. The property name of the PDF form should follow esl grammar so that OneSpan Sign can know which type of fileds you want and which signer/approval you want this field to be bound to.
The "extract":true is added to the document level.
2.Text Tags Extraction
Text Tags Extraction achieves the same goal with Document Extraction, only difference is you don’t use a pdf form. You direct embed esl grammar(including size) into your document and OneSpan Sign can recognize that snippet.
The "extract":true is also added to the document level.
3.Position Extraction
Position Extraction is a simplified document extraction, you just tell OneSpan Sign where and the size of the field, the type and other info still includes in the request payload.
Since position extraction is refined to the field, "extract":true is added to a field level.(which field you need position extraction, you need to add a extract=true)
4. Text Anchor
Text Anchor follows the same idea with Position Extraction. By given the specific snippet of your document word, OneSpan Sign can locate to the position and you need extra info in the request payload to specify the type and other info.
The extract should be set to false:"extract":false on field level just like position extraction.
5.Field Injection
Field Injection is different to those four. You would use PDF form with property name to locate the field, and inject values(text) to these fields. What you injected would become a part to the document before signers start to sign. Pretty like what you can done with these open source PDF libraries.
The "extract":true is added to the document level.
For second question. If you want to use UI to create a template, normally it's suggested to partially integrate this into your own application, and here's the workflow you may follow:
1.create a template programmatically, so that you can receive the package/template id
2.call API to get a Designer session (guide here), and embed Designer view into an iFrame (in a modal most cases)
3.make packages from template(guide here)
Hope this could help you!
Duo
Reply to: Creating and Sending Packages using JavaScript
Wednesday, November 7, 2018 at 11:56am
0
votes
https://github.com/nicoleweese/Abacus-Form-Upload
Please let me know why the package will not clone.
Error:
source.on('error', function() {});
TypeError: source.on is not a function
at Function.DelayedStream.create (/home/niko/Downloads/nodejs/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js:33:10)
at FormData.CombinedStream.append (/home/niko/Downloads/nodejs/node_modules/request/node_modules/combined-stream/lib/combined_stream.js:43:37)
at FormData.append (/home/niko/Downloads/nodejs/node_modules/request/node_modules/form-data/lib/form_data.js:68:3)
Reply to: Creating and Sending Packages using JavaScript
Wednesday, November 7, 2018 at 12:06pm
0
votes
Hi nweese,
The package with id of "-xarvqdcc5R4IqsfnqkOVFEA05o=" is a "package" instead of a "template", that's why you can't create packages from this one.
BTW, for test purpose, you can retrieve your template ID from url.
Duo
Reply to: Creating and Sending Packages using JavaScript
Tuesday, November 6, 2018 at 09:30amReply to: Creating and Sending Packages using JavaScript
Tuesday, November 6, 2018 at 12:18pmReply to: Creating and Sending Packages using JavaScript
Tuesday, November 6, 2018 at 02:00pmReply to: Creating and Sending Packages using JavaScript
Tuesday, November 6, 2018 at 03:11pmReply to: Creating and Sending Packages using JavaScript
Tuesday, November 6, 2018 at 04:16pmReply to: Creating and Sending Packages using JavaScript
Wednesday, November 7, 2018 at 07:27amReply to: Creating and Sending Packages using JavaScript
Wednesday, November 7, 2018 at 07:47amReply to: Creating and Sending Packages using JavaScript
Wednesday, November 7, 2018 at 11:56amReply to: Creating and Sending Packages using JavaScript
Wednesday, November 7, 2018 at 12:06pmReply to: Creating and Sending Packages using JavaScript
Wednesday, November 7, 2018 at 12:14pmReply to: Creating and Sending Packages using JavaScript
Wednesday, November 7, 2018 at 12:20pm