hassanraza89

Create URL to signed documents

0 votes

Hey how do i create a URL to send to client after all documents are signed by all parties. This is to give them ability to download package with signed documents in it.


Approved Answer

Reply to: Create URL to signed documents

0 votes

Hi Hassan,

 

This could because of:

(1)You have changed your UI Layout customization

(2)If you weren't aware of any customization, this might because of your package setting has either of below two settings on:

"settings": { "ceremony": { "layout": { "header": { "globalActions": { "download": false } } } } }

"settings": { "ceremony": { "disableDownloadForUncompletedPackage": true } }

 

For more information, you could refer to my blog below:

https://www.onespan.com/blog/new-signer-experience-thank-you-summary-page-part-1

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Create URL to signed documents

0 votes

Hi hassanraza89,

 

There are two ways to build such a link:

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

Note:

  • Signing URL API/SDK function works for both SENT and COMPLETE package
  • The main difference between a signing URL and an authentication token is that the Signing URL never expires, while a signer authentication token will only be valid for 30 minutes.

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Create URL to signed documents

0 votes

Thanks Liang, i tried that, at the time of package creation i loop through each signer and tried to call 

//create user authentication token
                string userAuthToken = eslClient.AuthenticationTokenService.CreateUserAuthenticationToken();

                //Create sender authentication token
                string senderAuthToken = eslClient.AuthenticationTokenService.CreateSenderAuthenticationToken(new PackageId(packageId.Id));

To get the token created and after all signer signed all document i tried to use the token and add it to https://sandbox.esignlive.com/access?sessionToken={signerAuthToken} but kept getting unauthorized access.

 

Thanks.


Reply to: Create URL to signed documents

0 votes

Hi Hassan,

 

If the authentication token was generated during package creation, I believe it was expired as it's only valid for 30 minutes. You will need to re-generate the token and please be aware that by doing this, it means the signer will only have 30 minutes time frame to access the URL. 

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Create URL to signed documents

0 votes

so i am trying under 30 min but still getting unauthorized error here is the code that i used 

//Create Package

 var package = packageBuilder.Build();
            var packageId = await Task.Run(() => eslClient.CreatePackage(package));

            foreach (var item in signingPackage.Signers)
            {
                //create user authentication token
                string userAuthToken = eslClient.AuthenticationTokenService.CreateUserAuthenticationToken();

                //Create sender authentication token
                string senderAuthToken = eslClient.AuthenticationTokenService.CreateSenderAuthenticationToken(new PackageId(packageId.Id));

                //Create signer authentication token
                string signerAuthToken1 = eslClient.AuthenticationTokenService.CreateSignerAuthenticationToken(new PackageId(packageId.Id), item.CustomId);
            }

 

i also tried to use to the token to get access to the document right after package is created and came across the same error.

 

What we really need is to create a URL for user after all signatures are complete and send them an email that documents can be downloaded using this url without any token expiration. very similar to email.Complete where is email is sent out by OneSpan with a download link.

We have done that for another project but for this we can not use email.Complete. I was looking at the URL sent by OneSpan when email.Complete is turned on is there any way to get the loginToken and form the same type of url for the user.

 

Thanks.


Reply to: Create URL to signed documents

0 votes

If you are looking for an unexpired URL, use this function instead:
string signingUrl = eslClient.PackageService.GetSigningUrl(packageId, item.CustomId);

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Create URL to signed documents

0 votes

Hey so i was able to generate a url using string signingUrl = eslClient.PackageService.GetSigningUrl(packageId, item.CustomId); but this url also has the same behavior where the URL is only available until all signatures are not complete once the package is complete if i try to go to the URL it returned unauthorized.


Reply to: Create URL to signed documents

0 votes

This shouldn't be expected. Below is a testing signing URL I generated, you can multi-use the link before and after the transaction being completed:

 

https://sandbox.esignlive.com/authentication?target=https%3A%2F%2Fsandbox.esignlive.com%2Ftransaction%2F0WthRS8Pt4UalLl2mOv4Bil9HvA%3D%2Fsign&loginToken=dEJROGhVU2w1cWNzM1ZBQmUrajF5WEFxWFlyUGtrbTVjS2Z5bGhEZnZ0V3E1MnI5Q3ZNZWlvNzBxdlJPL0t3N2RSYUIvSTIvRko5bkNtZTF0ekJDbWVYU1RWU3RCZkEyeGRjYkQrV2NPTnhHTGltamd1MW9kWXUyZkwybHFqbFNkRVJCZEc5dk1FRTFhRUZDVUROU1RrZFJWMmxPYTBKTmNUTXdPVXhKVjFoVlNYRm9ZMVp4YW1kS2RFZDNPRzVrUjJKNlVsTm5WMFJXTUdadVozUkhiL0hjY0ZlS0dPWnFuQXIwRExDdk9UNDJ6aHdWdnFMMXI4QTB4UDN5NnQ2MQ%3D%3D

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Create URL to signed documents

0 votes

Does it make a difference when this URL is generated i am currently generating it after marking package as sent

 

  // move package to sent status
            await Task.Run(() => eslClient.SendPackage(packageId));

            foreach (var item in signingPackage.Signers)
            {
                string signingUrl = await Task.Run(() => eslClient.PackageService.GetSigningUrl(packageId, item.CustomId));

            }

 


Reply to: Create URL to signed documents

0 votes

Can I have one example URL that your application generated?

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Create URL to signed documents

0 votes

Hi Hassan,

 

Your package status is ARCHIVED (not COMPLETE), my guess is that you have a listener application set up doing the auto-archiving.

 

Duo 

 

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Create URL to signed documents

0 votes

Oh ok i will check on that thanks alot


Reply to: Create URL to signed documents

0 votes

Hi 

the Signing URL is now working and it forwards the user to the OneSpan Thank You page but i saw your example and it has the Download Document button but on our side there is just the Review Documents and no Download Documents any idea why that is.

 

Thanks.


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off