DocuSign - How to get a URL that lasts longer than a few minutes? - docusignapi

I am using the DocuSign REST Api and noticed that the lifetime of a URL obtained using the EnvelopeViews API (https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient) is only a few minutes. However, I have gotten emails in the past with DocuSign links. How are these links able to be added to an email (and therefore have a longer lifetime)?
Is there a separate API that can be used to get a longer-life link like the one in the email?
For example, here is an email that has a Review Document DocuSign link:

Good question. Here's what you can do.
Your application wants to let Larry sign a document using the
EnvelopeViews::createRecipient API call.
Your application should store the details needed for the API call in your app's database. Something like: envelopeId, signerEmail, clientUserId.
Create a guid for the database record and add it to the database record.
Now you can look up the database record via either the row's key or
via the guid. Ensure that the guid database column is indexed.
Now create a signing url that you will send to Larry. Something like:
https://myapplication.example.com/docusign-ceremony/[guid]
Send the url to Larry
When Larry clicks on the URL:
Your app is invoked
Look up the guid in the url in your database. You should find the
record that you stored there.
Retrieve all of the record's info: envelopeId, signerEmail,
clientUserId.
Call the EnvelopeViews::createRecipient API call with the data
and get back the signing ceremony url (that must be used within
5 minutes)
Redirect the user's browser to the url.
They'll sign the document(s) and then be re-directed back to your
application.
Done.
And guess what? This is pretty much what DocuSign does itself.

The response from Larry K above is correct, you would need to handle this on your side.
These are all the parameters that you can send as part of the request body for the POST {vx}/accounts/{accountid}/envelopes/{envelopeid}/views/recipient API endpoint and there are no options to set the expiration time for the recipient view that you create.
You could look into using PowerForms to see if they fit your needs. With PowerForms you can create a URL that users can click and it will allow them to fill out a specific DocuSign envelope. This might not fit your needs if you need to pre-fill some of the fields with information related to the specific recipient but it might be worth looking at.
PowerForms Documentation:
https://www.docusign.com/features-and-benefits/features/powerforms

Please correct me if I'm wrong but I think that your goal is creating the recipient view URL, creating an email formatted in a specific way and sending that email to the recipients.
If you use the branding feature you could specify the format for your email (if you want to use a specific message) and just send the envelope to your recipients. Once the recipients receive the email they'll see the message in the format that you specified and the link for accessing the envelope would be a regular DocuSign link that doesn't expire.
The link below shows how to create Brands in your account. Specifically signing brands would allow you to set the email content.
If you have multiple email formats you could create multiple brands and just specify the brandId when creating the envelope.
I hope this helps.
Branding:
https://support.docusign.com/guides/ndse-admin-guide-configure-branding

Related

docusign REST API How to return signer to a url after signing PHP

I am building some functions to create my JSON using the sign-client PHP API and Models. I am create an envelope on docusign using the API and sending signers emails where they go to docusign to sign. I am not using embedded signing. I am doing this all though the API and plan to get and API plan so will not have all the web-based access.
I have one or more signers and after they sign I need to direct them to a URL on my site where they can make a payment. This URL us specific to each envelope, not the same for all signers.
I believe what I need to add is a 'returnUrl' to the createEnvelope so after the users sign, they are redirected back to my site. Here is what I have, but it is not working.
$signer = new \DocuSign\eSign\Model\Signer();
$signer->setName($signer_details['name']);
$signer->setEmail($signer_details['email']);
$signer->setRoleName($signer_details['role']);
$signer->setRecipientId(1);
$signer->setRoutingOrder(1);
$signer->setEmailRecipientPostSigningUrl('https://www.example.com');
By default, after signing the signer is given a docusign page. I am pretty sure there is a variable I can use to redirect them to my site. Anyone know how to do this?
Thom
Thanks!
If you want to redirect signer back to your App after signing is completed then you can configure Destination URL in your Branding. You can find details here, check Destination URLs for post-signing navigation section. Destination URL in Branding will be used only for Remote Signing.
The returnUrl property only applies for embedded signing.
Otherwise you would not be able to set it via the API - you would need to set it in the Branding options under "Go to Admin" and then "Brands" and then default brand, "Edit" and then "Destination URLs" and you can set the return URL for signing there based on the action that the signer takes.
Embedded signing allows you to set the returnUrl parameter and use a distinct URL for every session to return back to a specific place in your application instead of a generic one.
See https://docs.docusign.com/esign/guide/usage/embedded_signing.html
Unfortunately, the emailRecipientPostSigningUrl parameter is currently undocumented. I've asked the DocuSign engineering group for more information on it.
Meanwhile, please provide more information on what you want to do. Are you using embedded signing or signing via email notification from DocuSign?
Please edit your question to provide the additional information.
Added
As indicated in other answers, if you want to have a per-envelope URL then you either:
Use embedded signing. This is probably your best bet.
Or use the one url for all envelopes (via branding), then that url determines the real url for the envelope and further redirects the signer. I don't know if your first url receives the envelope_id or other information about what the signer did.

Using docusign EnvelopeViews: createSender as preview

createSender creates a URL, which I would like to use to let the sender preview the document before it's send out. Hence the documents are created using templates and and the API.
The link which is created would lead me out of my UI. Does the user need to sign in? Future plan is to have many user's, which have no DocuSign account.
For embedded sending Your app will have to authenticate the user. If you are doing a Service Integration then your Api account will be used as the sender.
Once the sending url is generated using the createSenderView api, there is no authentication required to access the URL.
You also have an option to build a User Application using the docusign Api where your App can support sending from multiple accounts.
The createSenderView requires that the person is a DocuSign user (with their own account and password).
Only DocuSign users can send. We charge for sending, not for signing or receiving.
What exactly do you want to preview? (And why?)
the documents themselves? Use the EnvelopeDocuments resource. You can also preview the thumbnails of the documents.
the documents with the "fields" ("tabs") that indicate where people will sign? I'm not sure that is do-able.
or the recipients and their routing order? Use EnvelopeRecipients: list method.
Added
Another solution is to use a dummy certified delivery "recipient". Add this recipient as the first recipient. This will block the envelope from proceeding on the recipient routing.
Then get the envelope's documents to show as a preview.
Then, if ok, alter the envelope's recipients to remove the certified delivery recipient. The envelope will then continue on with the first "real" recipient.

DocuSign: Rest API C# get permanent links for signers

I'm using DocuSign's REST API to create envelopes in embedded signing mode. With the function CreateRecipientView i get only a temporary link. But i would prefer to get an permanent link like in the notification mail. How can i get this link/URL?
Getting permanent signing links is not possible using the DocuSign rest API.
For remote signers, only the signer can receive the signing link through email. No one else will have access to the signing URL.
Setting permanent signing/access link is possible with "embeddedRecipientStartURL" by using a captive recipient aka "clientUserId" and your own URL endpoint whereby you authenticate your users and determine if they can access the envelope via a Request Recipient View.
Documentation here.
You can also request emails be sent per captive recipients as well as many other "Portal" centric options that put you in full control of the user experience.
To give your signers permanent links, your application creates the links by itself. Eg myapp.myserver.com/signing_links/95a086f7-a76e-40ec-938e-987be996d220
The number should be a guid, not a database record key. This is needed to prevent someone from guessing what one of these permanent links is, so they can't read (or sign!) someone else's documents.
When someone opens their browser to go to one of the signer links, your application looks up the guid in the your app's database. The database record will include the DocuSign envelope_id and the recipient_id that the link represents.
Next your app uses that data to request an embedded recipient view link from DocuSign. Then (if you get a good response back from DocuSign), your app redirects the user's browser to the signing page on DocuSign.
(You'd get back an error from DocuSign if the recipient had already signed, or the envelope had been voided, etc.)
Guess what? The above is more or less how DocuSign gives out the "permanent" links in its emails--those links always redirect to one of the 5-minutes-only signing ceremony links.
Remember that you need to authenticate the signers, or include additional authentication options in your envelope, since you don't know who is going to end up pressing one of your app's signer links.
Setting vs Getting permanent signing/access link is possible with "embeddedRecipientStartURL" by using a captive recipient aka "clientUserId" and your own URL endpoint whereby you authenticate your users and determine if they can access the envelope via a Request Recipient View.
https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST%20API%20References/Recipients/Signers%20Recipient.htm
You can also request emails be sent per captive recipients as well as many other "Portal" centric options that put you in full control of the user experience.
So Net/Net, LarryK and CodingDawg are correct, each from a specific view. It ultimately is up to you to decide which way works best for your application and users.

Can we customize email content at runtime

I have looked at several PDF uploaded on docusign website but didn't get success at all. My problem is I want to create a generic email template in my docusign account but want to update its uncommon(client specific) content dynamically using the Docusign Web-service API.
For example: Client Name, Client Address, Phone Number, Mobile number, Payment Amount, and Payment Last date are some fields whose values varies based on client whereas other content of the email is common for all, Hence I want to understand that is there any way so that I can set the values for this fields in WS call and docusign will use that common email template and replace the customized fields on the fly for every client.
We Will make one WS call for one client at a time. Please help it is quite crucial for us.
Currently we are creating email content to our side and set into the EmailBlur but want to do it more customized so in future we can make changes easily.
Quick response is highly appreciate!
Thanks in Advance !!
It's not possible to create/maintain an "email template" in DocuSign that contains placeholder variables for you to dynamically inject client-specific values into the email for each Envelope as part of the Create Envelope request.
To acheive your scenario, you'll need to create/maintain the email template contents within your application, and have your application dynamically generate the email contents for each Envelope. Then you can simply set the Envelope's emailBlurb property (in the Create Envelope request) to the contents (i.e., full email body) that your application generated.
It is Account related setting which needs to be enable by docusign, In my case I have contacted them and they made some changes after which the emailblurb method start supporting HTML.

Where can I find the security code in the Envelope

When DocuSign sends an email to a user requesting a signature, the View Documents button contains a link to a URL such as this:
https://demo.docusign.net/Member/EmailStart.aspx?a=564ffc65-28s7-402b-a499-cfec5526db3c&er=ac335504-8a6d-49a0-bfb6-3793887c0722
I know that the second parameter in the URL call is the recipient Id, which I can see in the envelope. However, I cannot find the first parameter.
Is there anyway I can regenerate the URL?
The reason I ask is that we have a website with a message center. Upon logging into our website, if the user has documents that require signature, I want to display a list of links for them to click and sign.
If you have a website with a message center and login I believe you should shift your paradigm of how you use DocuSign. DocuSign has a concept of an embedded signer. That means you notify the signer and when they log into your site you can make a web service call to present the person with a signing in an IFRAME or a separate window.
You can find the breakdown of that scenario in this code walkthrough:
http://iodocs.docusign.com/APIWalkthrough/embeddedSigning
A broader overview is here:
http://www.docusign.com/developer-center/explore/features/embedding-docusign
It is impossible for you to figure out or regenerate the GUIDs that are passed with envelope notification. That's one of the security features of DocuSign notifications.
Hope this helps.

Resources