- 10 Oct 2024
- 4 Minutes to read
- DarkLight
- PDF
Creating a Signing Session
- Updated on 10 Oct 2024
- 4 Minutes to read
- DarkLight
- PDF
Java SDK.NET SDKREST APIAPEX SDK
Java SDK
To download the full code sample see our Code Share site.
After a transaction has been sent, you can create a Signer Experience for your signers. This can be done in one of the following ways:
By creating a session token and then building URL redirect,
By retrieving the signing URL.
The difference between building the URL with a session token and retrieving a signing url is that a signing URL does not expire.
Creating a Signer Experience
To create a Signer Experience, you must first create the PackageId object of your document package.
If you need a comparison to the basic object creation procedure, or if this is the first time creating a transaction, see Creating and Sending a Transaction.
To create a Signer Experience it is important to note that the status of your transaction must be either SENT or COMPLETE. Otherwise, an exception will be thrown.
Once you have your PackageId object, you use the OneSpan SignApprovalService to pass the PackageId object and SignerId string as parameters to retrieve the signing url. For example:
String signerId = "Signer1";
String packageid = "your_package_id";
EslClient eslClient = new EslClient(API_KEY, API_URL);
PackageId packageId = new PackageId(packageid);
String signingUrl = eslClient.getPackageService().getSigningUrl(packageId, signerId);
System.out.println(signingUrl);
Results
Here is an example of what you can expect to see once you have run your code.
.NET SDK
To download the full code sample see our Code Share site.
After a transaction has been sent, you can create a Signer Experience for your signers. This can be done in one of the following ways:
By creating a session token and then building URL redirect,
By retrieving the signing URL.
The difference between building the URL with a session token and retrieving a signing url is that a signing URL does not expire.
Creating a Signer Experience
To create a Signer Experience, you must first create the PackageId object of your document package.
If you need a comparison to the basic object creation procedure, or if this is the first time creating a transaction, see Creating and Sending a Transaction.
To create a Signer Experience it is important to note that the status of your transaction must be either SENT or COMPLETE. Otherwise, an exception will be thrown.
Once you have your PackageId object, you use the OneSpan SignApprovalService to pass the PackageId object and SignerId string as parameters to retrieve the signing url. For example:
string signerId = "Signer1";
string packageid = "your_package_id";
EslClient eslClient = new EslClient(API_KEY, API_URL);
PackageId packageId = new PackageId(packageid);
string signingUrl = eslClient.PackageService.GetSigningUrl(packageId, signerId);
Debug.WriteLine(signingUrl);
Results
Here is an example of what you can expect to see once you have run your code.
REST API
To download the full code sample, see our Code Share site.
After a transaction has been sent, you can create a Signer Experience for your signers. This can be done in one of the following ways:
By creating a session token and then building URL redirect,
By retrieving the signing URL.
The difference between building the URL with a session token and retrieving a signing url is that a signing URL does not expire.
Creating a Signer Experience
To create a Signer Experience, you must first create the PackageId object of your document package.
If you need a comparison to the basic object creation procedure, or if this is the first time creating a transaction, see Creating and Sending a Transaction.
To create a Signer Experience it is important to note that the status of your transaction must be either SENT or COMPLETE. Otherwise, an exception will be thrown.
Once you have your PackageId, you will then need to retrieve the role id and make the following request:
HTTP Request
GET /api/packages/{packageId}/roles/{roleId}/signingUrl
HTTP Headers
Accept: application/json
Content-Type: application/json
Authorization: Basic api_key
Response Payload
{
"roleId": "2jsTTXD2dZMZ",
"url": "https://sandbox.e-signlive.com/auth?target=https%3A%2F%2Fsandbox.esignlive.com\r\n%2Fpackages%2FnaXQwWFSQB9RkOiH6AguBCkXp2k=%2Fsign&loginToken=\r\nMi4xMDAwGpGY3JJPS55ZnNSeHBmekNxc1RzdnNJRVlBSDkZBR1RhcmxKS09aZ3M4aFZXVlpvdExrdz09",
"packageId": "a3b023bf-db56-4c53-b36e-bd9acd0579f4"
}
Results
Here is an example of what you can expect to see once you have run your code.
APEX SDK
To download the full code sample see our Code Share site.
After a transaction has been sent, you can create a Signer Experience for your signers. This can be done in one of the following ways:
By creating a session token and then building URL redirect,
By retrieving the signing URL.
The difference between building the URL with a session token and retrieving a signing url is that a signing URL does not expire.
Creating a Signer Experience
To create a Signer Experience, you must first create the PackageId object of your document package.
If you need a comparison to the basic object creation procedure, or if this is the first time creating a transaction, see Creating and Sending a Transaction.
To create a Signer Experience it is important to note that the status of your transaction must be either SENT or COMPLETE. Otherwise, an exception will be thrown.
Once you retrieved your package ID, use the encapsulated function below to pass the PackageID and RoleId as parameters to retrieve the signing url.
public String getSigningUrl(String packageId, String roleId) {
// Your implementation here
// Example: return the signing URL based on packageId and roleId
String signingUrl = 'https://example.com/sign?packageId=' + packageId + '&roleId=' + roleId;
return signingUrl;
}
Results
Here is an example of what you can expect to see once you have run your code.