Signer Session

This guide will cover how to create a signer session in OneSpan Sign.

As integrated users, before signers can sign a document, they need to have a session created for them. With OneSpan Sign, you are able to directly request a session for a particular signer to sign a particular document package. This guide demonstrates how to create a signing ceremony session for your signer.

The Code

A complete example code can be found in the Developer Community Code Share, here.

The first step is to create and send your package. If you need a comparison to the basic document object creation or if this is the first time creating a package with the Java SDK, see this guide.

DocumentPackage testPackage = PackageBuilder.newPackageNamed("Example Package")
				.withSigner(SignerBuilder.newSignerWithEmail("john.smith@example.com")
						.withFirstName("John")
						.withLastName("Smith")
						.withCustomId("Signer1"))
				.withDocument(DocumentBuilder.newDocumentWithName("Test Document")
						.fromFile("C:/Users/hhaidary/Desktop/pdf/doc1.pdf")
						.withSignature(SignatureBuilder.signatureFor("john.smith@example.com")
								.atPosition(100, 100)
								.onPage(0)))
				.build();
		
PackageId packageId = eslClient.createAndSendPackage(testPackage);

Then, you call on OneSpan Sign’s AuthenticationTokensService to create an authentication token for your signer.

String signerAuthenticationToken = eslClient.getAuthenticationTokensService().createSignerAuthenticationToken(packageId.toString(), "Signer1");

Next, you will need to build an authentication client object and pass as parameter your endpoint URL, as shown below.

AuthenticationClient authClient = new AuthenticationClient("https://sandbox.esignlive.com");

Finally, you build your redirect to the signer signing ceremony using the signer authentication token and the package id.

String url = authClient.buildRedirectToSigningForSigner(signerAuthenticationToken, packageId.getId());
		
System.out.println(url);

Running Your Code

After running your code, you should be able to see the signing URL printed out to the console.

Capture

Get the Code

As integrated users, before signers can sign a document, they need to have a session created for them. With OneSpan Sign, you are able to directly request a session for a particular signer to sign a particular document package. This guide demonstrates how to create a signing ceremony session for your signer.

The Code

A complete example code can be found in the Developer Community Code Share, here.

The first step is to create and send your package. If you need a comparison to the basic document object creation or if this is the first time creating a package with the .NET SDK, see this guide.

DocumentPackage testPackage = PackageBuilder.NewPackageNamed("Example Package")
				    .WithSigner(SignerBuilder.NewSignerWithEmail("john.smith@example.com")
						    .WithFirstName("John")
						    .WithLastName("Smith")
						    .WithCustomId("Signer1"))
				    .WithDocument(DocumentBuilder.NewDocumentNamed("Test Document")
						    .FromFile("C:/Users/hhaidary/Desktop/pdf/doc1.pdf")
						    .WithSignature(SignatureBuilder.SignatureFor("john.smith@example.com")
								    .AtPosition(100, 100)
								    .OnPage(0)))
				    .Build();
		
PackageId packageId = eslClient.CreateAndSendPackage(testPackage);

Then, you call on OneSpan Sign’s AuthenticationTokensService to create an authentication token for your signer.

string signerAuthenticationToken = eslClient.AuthenticationTokenService.CreateSignerAuthenticationToken(packageId, "Signer1");

Next, you will need to build an authentication client object and pass as parameter your endpoint URL, as shown below.

AuthenticationClient authClient = new AuthenticationClient("https://sandbox.esignlive.com");

Finally, you build your redirect to the signer signing ceremony using the signer authentication token and the package id.

string url = authClient.BuildRedirectToSigningForSigner(signerAuthenticationToken, packageId);

Debug.WriteLine(url);

Running Your Code

After running your code, you should be able to see the signing URL printed out to the console.

Capture

Get the Code

As integrated users, before signers can sign a document, they need to have a session created for them. With OneSpan Sign, you are able to directly request a session for a particular signer to sign a particular document package. This guide demonstrates how to create a signing ceremony session for your signer.

The Code

A complete example code can be found in the Developer Community Code Share, here.

The first step is to create and send your package. If you need a comparison to the basic document object creation or if this is the first time creating a package with the REST API, see this guide.

Then, you will need to create a signer authentication token.

HTTP Request
POST /api/signerAuthenticationTokens

HTTP Headers
Accept: application/json
Content-Type: application/json
Authorization: Basic api_key

Request Payload

{
  "packageId": "-re9mEyRIgdX56V_6wT3ymZW-vs=",
  "signerId": "Signer1"
}

Response Payload

{
  "packageId": "-re9mEyRIgdX56V_6wT3ymZW-vs=",
  "signerId": "Signer1",
  "value": "MjY0MjQ4MzgtMTJlOS00MzhjLTgzODMtMzJmMGNiZTg3ODBl"
}

You will receive a signer authentication token as a response from OneSpan Sign and use it to build a redirect to the signing ceremony for your signer.

https://sandbox.eSignLive.com/access?sessionToken={signerAuthenticationToken}

Running Your Code

After running your code, you should be able to see the signing URL printed out to the console.

Capture

Get the Code

JSON Properties

Property Type Editable Required Default Sample Value(s)
packageId string Yes Yes n/a -re9mEyRIgdX56V_6wT3ymZW-vs=
signerId string Yes Yes n/a Signer1

As integrated users, before signers can sign a document, they need to have a session created for them. With OneSpan Sign, you are able to directly request a session for a particular signer to sign a particular document package. This guide demonstrates how to create a signing ceremony session for your signer.

The Code

To notice, some of the code is an extension of the APEX SDK and can be gotten through this Code Share.

Once you created and sent your package, you call below encapsulated function to create an Authentication Token for your signer.

public String createSignerAuthenticationToken(String packageId, String signerId, Map<String,String> sessionFields)

You will need to pass your package ID and Signer ID/Email as a parameter to the function. Additional, you can also pass a map of session fields per signer to store extra data as part of the Evidence Summary.

Refer to this guide for more information on Session Fields.

Finally, you build your redirect to the signer signing ceremony using the signer Authentication Token using below function:

public String buildRedirectToSigningForSigner(String authenticationToken)

And this link will get expired once your Authentication Token is expired.

Running Your Code

After running your code, you should be able to see the signing URL printed out to the console.

Capture

Get the Code