Session Fields

This guide shows you how to store extra data as part of the evidence summary.

Extra data can be stored as part of the evidence summary by passing additional session fields per signer when creating a signing session. These fields are saved in the evidence summary, and are stored in the signature details of signed documents.

The Code

The first step is to create and send a 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.

Then, the next step is to create a new Map object with your key/value pairs.

Map<String, String> signerSessionFields = new LinkedHashMap<String, String>();
signerSessionFields.put("Transaction ID", "1234567890");
signerSessionFields.put("Login Token", "8888888888888");

Next, you use to AuthenticationTokensService to create a signer authentication token using the package id, signer id, and the session fields.

final String signerAuthenticationToken = eslClient.getAuthenticationTokensService().createSignerAuthenticationToken(packageId.getId(), "signer1", signerSessionFields);

Finally, you build the signing session URL using the signer authentication token.

System.out.println("https://sandbox.esignlive.com/access?sessionToken=" + signerAuthenticationToken);

Running Your Code

Once you’ve opened a session for your signer and the package has been completed, you can download the evidence summary to view the session fields.

1

Get the Code

Extra data can be stored as part of the evidence summary by passing additional session fields per signer when creating a signing session. These fields are saved in the evidence summary, and are stored in the signature details of signed documents.

The Code

The first step is to create and send a 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.

Then, the next step is to create a new IDictionary object with your key/value pairs.

IDictionary<string, string> signerSessionFields = new Dictionary<string, string>();
signerSessionFields.Add("Transaction ID", "1234567890");
signerSessionFields.Add("Login Token", "8888888888888");

Next, you use to AuthenticationTokensService to create a signer authentication token using the package id, signer id, and the session fields.

var signerAuthenticationToken = eslClient.AuthenticationTokenService.CreateSignerAuthenticationToken(packageId, "signer1", signerSessionFields);

Finally, you build the signing session URL using the signer authentication token.

Debug.WriteLine("https://sandbox.esignlive.com/access?sessionToken=" + signerAuthenticationToken);

Running Your Code

Once you’ve opened a session for your signer and the package has been completed, you can download the evidence summary to view the session fields.

1

Get the Code

Extra data can be stored as part of the evidence summary by passing additional session fields per signer when creating a signing session. These fields are saved in the evidence summary, and are stored in the signature details of signed documents.

The Code

The first step is to create and send a 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, the next step is to create a signer authentication token with the key/value pair session fields:

HTTP Request
POST /api/signerAuthenticationTokens

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

Request Payload

{
  "packageId": "x31anVFrwliCsGQXLJoqv0GRZ1w=",
  "sessionFields": {
    "Transaction ID": "1234567890",
    "Login Token": "8888888888888"
  },
  "signerId": "signer1"
}

For a complete description of each field, take a look at the JSON Properties section below.

Response Payload

{
   "packageId":"x31anVFrwliCsGQXLJoqv0GRZ1w=",
   "signerId":"signer1",
   "value":"ZDNmMDNiNGUtNGYxOC00YWZiLTkwMmUtNWE5YmIwZTRjZDg1",
   "sessionFields": {
      "Transaction ID": "1234567890",
      "Login Token": "8888888888888"
    },
}

Finally, you build the signing session URL using the signer authentication token.

https://sandbox.esignlive.com/access?sessionToken={signerAuthToken}

Running Your Code

Once you’ve opened a session for your signer and the package has been completed, you can download the evidence summary to view the session fields.

1

Get the Code

JSON Properties

Property Type Editable Required Default Sample Value(s)
packageId string Yes No n/a x31anVFrwliCsGQXLJoqv0GRZ1w=
signerId string Yes No n/a signer1
sessionFields string Yes No n/a Transaction ID / 1234567890

Extra data can be stored as part of the evidence summary by passing additional session fields per signer when creating a signing session. These fields are saved in the evidence summary, and are stored in the signature details of signed documents.

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

The Code

The first step is to create and send a package. If you need a comparison to the basic package creation or if this is the first time creating a package with the Apex SDK, see this guide.
Then, the next step is to create a new Map object with your key/value pairs.

//prepare for session fields
Map<String,String> sessionFields = new Map<String,String>();
sessionFields.put('username','123');
sessionFields.put('password','456');

Next, you use below encapsulated function to create an Authentication Token for your signer using the package id, signer id, and the session fields.

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

Finally, you build the signing session URL using this function:

public String buildRedirectToSigningForSigner(String authenticationToken)

Running Your Code

Once you’ve opened a session for your signer and the package has been completed, you can download the evidence summary to view the session fields.

Capture

Get the Code