An authentication token is used to obtain a valid session for a particular user of the system. In this blog, we will introduce four kinds of authentication tokens: userAuthToken, senderAuthToken, signerAuthToken and singleUseSignerAuthToken. Among these tokens, all of them are single-use except signerAuthToken. The default expire time of all these tokens is 30 minutes.

The Code

A user authentication token is token that can be used to obtain a session for a user with complete access to the account.

String userAuthToken = eslClient.getAuthenticationTokensService().createUserAuthenticationToken();

Using the user authentication token, you can access your OneSpan Sign account by building the following URL:

https://sandbox.esignlive.com/auth?authenticationToken={userToken}&target=https://sandbox.esignlive.com/a/dashboard

A sender authentication token is token that can be used to obtain a session for a sender with access only to a specific package/transaction.

String senderAuthToken = eslClient.getAuthenticationTokensService().createSenderAuthenticationToken(packageId);

Using the sender authentication token, you can access the transaction by building the following URL:

https://sandbox.esignlive.com/auth?authenticationToken={senderToken}&target=https://sandbox.esignlive.com/a/transaction/{packageId}

A signer authentication token is token that can be used to obtain a session for a signer with access to the Signing Ceremony.

String signerAuthToken = eslClient.getAuthenticationTokensService().createSignerAuthenticationToken(packageId, signerId);

The signer token above can be used multiple times. You can also create a signer token with a single use:

String singleUseToken = eslClient.getAuthenticationTokensService().createSignerAuthenticationTokenForSingleUse(packageId, signerId, signerSessionFields);

Using the signer authentication token, you can obtain a signing session by building the following URL:

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

Get the Code

An authentication token is used to obtain a valid session for a particular user of the system. In this blog, we will introduce four kinds of authentication tokens: userAuthToken, senderAuthToken, signerAuthToken and singleUseSignerAuthToken. Among these tokens, all of them are single-use except signerAuthToken. The default expire time of all these tokens is 30 minutes.

The Code

A user authentication token is token that can be used to obtain a session for a user with complete access to the account.

string userAuthToken = eslClient.AuthenticationTokenService.CreateUserAuthenticationToken();

Using the user authentication token, you can access your OneSpan Sign account by building the following URL:

https://sandbox.esignlive.com/auth?authenticationToken={userToken}&target=https://sandbox.esignlive.com/a/dashboard

A sender authentication token is token that can be used to obtain a session for a sender with access only to a specific package/transaction.

string senderAuthToken = eslClient.AuthenticationTokenService.CreateSenderAuthenticationToken(new PackageId(packageId));

Using the sender authentication token, you can access the transaction by building the following URL:

https://sandbox.esignlive.com/auth?authenticationToken={senderToken}&target=https://sandbox.esignlive.com/a/transaction/{packageId}

A signer authentication token is token that can be used to obtain a session for a signer with access to the Signing Ceremony.

string signerAuthToken = eslClient.AuthenticationTokenService.CreateSignerAuthenticationToken(new PackageId(packageId), signerId);

The signer token above can be used multiple times. You can also create a signer token with a single use:

string singleUseToken = eslClient.AuthenticationTokensService.CreateSignerAuthenticationTokenForSingleUse(packageId, signerId, signerSessionFields);

Using the signer authentication token, you can obtain a signing session by building the following URL:

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

Get the Code

An authentication token is used to obtain a valid session for a particular user of the system. In this blog, we will introduce four kinds of authentication tokens: userAuthToken, senderAuthToken, signerAuthToken and singleUseSignerAuthToken. Among these tokens, all of them are single-use except signerAuthToken. The default expire time of all these tokens is 30 minutes.

The Code

A user authentication token is token that can be used to obtain a session for a user with complete access to the account.

HTTP Request

POST /api/authenticationTokens/user

HTTP Headers

Accept: application/json Authorization: Basic api_key

For a complete description of each field, take a look at the Request Payload section below.

Response Payload

{
   "value": "MjY0MjQ4MzgtMTJlOS00MzhjLTgzODMtMzJmMGNiZTg3ODBl"
}

Using the user authentication token, you can access your OneSpan Sign account by building the following URL:

https://sandbox.esignlive.com/auth?authenticationToken={userToken}&target=https://sandbox.esignlive.com/a/dashboard

A sender authentication token is token that can be used to obtain a session for a sender with access only to a specific package/transaction.

HTTP Request

POST /api/authenticationTokens/sender

HTTP Headers

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

Request Payload

{
   "packageId: "5vjLRY5MWrDJ6MzRAEyCKOy5IH0="
}

Response Payload

{
   "value": "MjY0MjQ4MzgtMTJlOS00MzhjLTgzODMtMzJmMGNiZTg3ODBl"
}

Using the sender authentication token, you can access the transaction by building the following URL:

https://sandbox.esignlive.com/auth?authenticationToken={senderToken}&target=https://sandbox.esignlive.com/a/transaction/{packageId}

A signer authentication token is token that can be used to obtain a session for a signer with access to the Signing Ceremony.

HTTP Request

POST /api/authenticationTokens/signer/multiUse

HTTP Headers

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

Request Payload

{
    "packageId": "5vjLRY5MWrDJ6MzRAEyCKOy5IH0=",
    "signerId": "8b734331-bc5b-4843-9784-d4ece4b7dc22"
}

Response Payload

{
   "packageId":"5vjLRY5MWrDJ6MzRAEyCKOy5IH0=",
   "signerId":"8b734331-bc5b-4843-9784-d4ece4b7dc22",
   "value":"ZDNmMDNiNGUtNGYxOC00YWZiLTkwMmUtNWE5YmIwZTRjZDg1"
}

The signer token above can be used multiple times. You can also create a signer token with a single use:

HTTP Request

POST /api/authenticationTokens/signer/singleUse

HTTP Headers

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

Request Payload

{
   "packageId":"s-wy6PFASBlAKfnLJjcbzoaMyTg=",
   "signerId":"[email protected]"
}

Response Payload

{
   "packageId":"s-wy6PFASBlAKfnLJjcbzoaMyTg=",
   "sessionFields": null,
   "signerId":"[email protected]",
   "value":"ZDNmMDNiNGUtNGYxOC00YWZiLTkwMmUtNWE5YmIwZTRjZDg1"
}

Using the signer authentication token, you can obtain a signing session by building the following URL:

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

Get the Code

Request Payload

PropertyTypeEditableRequiredDefaultSample Value(s)
packageIdstringNoNon/a5vjLRY5MWrDJ6MzRAEyCKOy5IH0=
signerIdstringYesNon/a8b734331-bc5b-4843-9784-d4ece4b7dc22
valuestringNoNon/aZDNmMDNiNGUtNGYxOC00YWZiLTkwMmUtNWE5YmIwZTRjZDg1

An authentication token is used to obtain a valid session for a particular user of the system. In this blog, we will introduce four kinds of authentication tokens: userAuthToken, senderAuthToken, signerAuthToken and singleUseSignerAuthToken. Among these tokens, all of them are single-use except signerAuthToken. The default expire time of all these tokens is 30 minutes. To notice, some of the code is an extension of the APEX SDK and can be gotten through this Code Share.

The Code

A user authentication token is token that can be used to obtain a session for a user with complete access to the account, you can use below encapsulated function to retrieve one:

public String createUserAuthenticationToken()

Using the user authentication token, you can access your OneSpan Sign account by building the following URL:

https://sandbox.esignlive.com/auth?authenticationToken={userToken}&target=https://sandbox.esignlive.com/a/dashboard

A sender authentication token is token that can be used to obtain a session for a sender with access only to a specific package/transaction, this function is encapsulated like below:

public String createSenderAuthenticationToken(String packageId)

Using the sender authentication token, you can access the transaction by building the following URL:

https://sandbox.esignlive.com/auth?authenticationToken={senderToken}&target=https://sandbox.esignlive.com/a/transaction/{packageId}

A signer authentication token is token that can be used to obtain a session for a signer with access to the Signing Ceremony.

public String createSignerAuthenticationTokenForMultiUse(String packageId, String signerId)

The signer token above can be used multiple times. You can also create a signer token with a single use:

public String createSignerAuthenticationTokenForSingleUse(String packageId, String signerId)

Signer ID in this function can also be replaced by Signer Email. Using the signer authentication token, you can obtain a signing session by building the following URL:

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

Get the Code