Client SDK
The client SDK provides an encapsulated library exposing simple to use methods that hide the complexity of integrating with our Rest API.
* The provided SDKs' codes are on Github. Fork me on GitHub
JavaScript
We also host the JavaScript version from our hosting.
Please add the following script reference in the header section of your page
<script data-main="//api.securedsigning.com/web/v1.4/client/scripts/main" src="//api.securedsigning.com/web/v1.4/client/scripts/require.js"></script>
To initialise the JavaScript SDK library
First create a config object as shown below
var config = {
"apiKey": <YOUR API KEY HERE>,
"baseUrl": "//api.securedsigning.com/web",
"version": "v1.4",
"secret": <YOUR API SECRET HERE>
};
Next initialise the library.
We have provided a function SSApiLoaded
that executes when the scripts have loaded if you are using our hosted JavaScript libraries
function SSApiLoaded() {
securedsigning = new SecuredSigning(config);
};
An SDK method call normally takes 3 parameters
- requestData: the data required for performing the task
- onSuccess: Callback function to handle a successful request
- onError: Callback function to handle any errors
An example
securedsigning.sendSmartTagDocument(requestData, function (data) {
console.log(data);
},function (error) {
console(error);
});
.NET
You can view the source code on GitHub HERE
Install our .NET client SDK
SecuredSigning.Client PM> Install-Package SecuredSigning.Client
This library has the following dependencies ServiceStack.Client.Signed, ServiceStack.Text.Signed and ServiceStack.Interfaces
To initialise the library call the constructor
var client = new ServiceClient("https://api.securedsigning.com/web","v1.4", <YOUR API KEY HERE>, <YOUR API SECRET HERE>);
We have provided data objects for the requests e.g.
[Schema("EmailTemplate")]
public class EmailTemplate
{
public string Reference { get; set; }
public string Name { get; set; }
}
An example of a function call
var forms = client.getFormList();
Other Languages
We have provided more client SDKs of different programing languages as well, with their source codes on GitHub.
UI SDK
The UI SDK is provided as part of the JavaScript sdk. Please add the scripts as below
<script data-main="//api.securedsigning.com/web/v1.4/client/scripts/main" src="//api.securedsigning.com/web/v1.4/client/scripts/require.js"></script>
Initialising SDK
To initialise the JavaScript SDK library
First create a config object as shown below
var config = {
"apiKey": <YOUR API KEY HERE>,
"baseUrl": "//api.securedsigning.com/web",
"version": "v1.4",
"secret": <YOUR API SECRET HERE>
};
Uploading a document
You can use our uploader to add a document for signing
Use the following JavaScript function passing in a DOM element id for the upload button
This then on Success starts an ISign or WeSign process
securedsigning.CreateUpload(<DOM ELEMENT ID>, function(data) {
ISign(data.Reference);
//WeSign(data.Reference);
},function (error) {
alert(error);
});
After a document is submitted, a reference will return.
Embedding html resources
I Sign
For an I Sign signing resource
This embeds a signing resource in a DOM element with the id of 'content'
function ISign(ref) {
var request = {
Email: "firstlastname@sample.com",
FirstName: "firstname",
LastName: "lastname",
DocumentReference: ref
};
securedsigning.getISignResource(request, "content", function (error) {
});
}
We Sign
For an We Sign signing resource
This embeds a signing resource in a DOM element with the id of 'content'
function WeSign(ref) {
var request = {
DocumentReference: ref
};
securedsigning.getWeSignResource(request, "content", function (error) {
});
}
Download a sample webpage HERE.