Docusign Embedded Signing - Can i give a different return url to be shown when session gets expired? - docusignapi

I have integrated Docusign embedded signing in my Portal. Now i am using a return url to be shown when user signs the document but the problem is that same return url is shown when the embedded signing session expires. Is there any way i can specify different return url for the expire session case?

Sorry, there's only one return_url.
But it includes the event query parameter (QP) to tell your app how the embedded signing ceremony ended.
Also note that just because the event QP says that the envelope was signed, you should take that with a grain of salt, since a bad guy could be spoofing your app. So before you make a business decision based on whether the person signed or not, ask DocuSign for the envelope's status or refer to a notification from a webhook.

Related

Maintain document signing progress when using JWT grant

Building an app where I have to generate documents for users to sign (where the users are not employees that are part of the docusign account). Based on the docs here: https://developers.docusign.com/platform/auth/, I should be using a JWT Grant for authentication.
My question is: when any user opens up the document to start signing, is there a way to maintain the progress that the user has made while keeping embedded signing? I've seen the "Finish Later" button, but that sends an email to the user.
The status of the signing for the specific user is maintained by DocuSign. If they go back to sign again, they'll see whatever progress they made so far. In order for you to do that, you'll have to call the same API to generate a new embedded signing URL for the same user, just the same way you did the first time. You can completely avoid having any emails sent to the user if that's what you want.
Final comment - all of this has nothing to do with JWT. You can use JWT or use Auth Code Grant and the rest is the same.

Docusign eSignature REST API authentication

I am trying to integrate Docusign in my Web application. The website workflow will be as follows:
Users visit my website and log in.
Users will be given the option to choose Docusign Templates.
After selection, users need to sign that document.
After a successful signing, the signed document is sent to some authority.
My problem is how can I link my users to Docusign to sign. Does every user needs to have an account for embedded signing?? I need some help in understanding the flow of authentication and signing in DocuSign REST API. I have gone through the documentation but didn't understand properly. When I try to use the auth grant GitHub code to understand the flow. After logging in, it throws a null pointer exception. Please, someone, help me.
You can find code example in different languages to do what you're asking (sign from a template). You will want to use embedded signing so that the user sign as part of the app and not remote signing (via email).
As for your authentication question, no, signers never need to be part of the account. The sender can be a single user that is "sending" envelopes that are embedded in the app. So while there's no sending technically, you can think of it this way.
Hope this makes sense, please ask additional questions if not clear
recipientID is a GUID uniquely used to identify a recipient in DocuSign. When you create an envelope, each recipient should have one.
"and If the same name+email combination comes again, will it get the same signature or generate a new one?" It will remember it if they have an account.

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.

How do you get the preparation redirect URL for a created Envelope?

I'm using a service account to send an envelope on behalf of another user. Using the API, I'm then creating an envelope in the "created" status for manual tab placement. Once I get the EnvelopeSummary back from the DocuSign API, I'd like to create a URL that I will send send back to the "send on behalf of" user so he/she can easily begin to place tabs.
I've looked into using the CreateSenderView/CreateConsoleView methods, however I don't know the AccountId/Password of the "send on behalf of" user nor do I want to use their information. Instead, I'd like to redirect the user to DocuSign where they can login and then after login, be redirected to the envelope.
I've also looked into creating my own URL from the envelopeId:
string envelopeId = "1ddff790-ad2d-4fb6-87c2-4b5e449898c9";
string redirectUrl = "https://appdemo.docusign.com/prepare/" + envelopeId;
This appears to redirect the user to the envelope if they are logged in, and if not, they will be prompted to login and then redirected. This is the functionality I am looking for, however, I'd like to use the API to generate this URL if possible since I'm not sure whether the referenced URL will remain static over time.
Any ideas?
If you haven't already done so, I'd suggest that you review DocuSign API documentation for the Send on Behalf Of (SOBO) feature. As the documentation describes:
The SOBO feature can only be used when both users are members of the same DocuSign account.
You (your application / UI) must collect username and password at least one time from the user whom you're sending on behalf of -- because you need their username and password in order to obtain an access token that can subsequently be used to submit API requests on their behalf. Since tokens do not expire (and are valid even if/when the SOBO user changes their password), you only need to collect username/password one time from the SOBO user, then use those credentials to generate an access token which can be used indefinitely to send on their behalf.
I would not recommend using the envelopeId to create your own URL, as this functionality is not supported by DocuSign -- even if it works today, there's no guarantee it'll continue to work in the days ahead.
Finally, issuing a Create Sender View request (using SOBO) will return a URL that can be used to launch the sender (tagging) view for the specified Envelope. Do note, however, that the URL will expire after a short period of time (5 minutes?) -- which means that you should not issue the Create Sender View request to retrieve the URL until the user (sender) is ready to tag/send the Envelope. For example, issuing the request to generate the URL and then emailing that URL to the sender would not be feasible -- since there's no guarantee that the user (sender) would open the email and click the link to launch the sender view before the link expires. Instead, you should provide the sender with a way to indicate to your application when they are ready to tag/send the Envelope, and then issue the Create Sender View request at that time and redirect the user (sender) to that URL immediately upon receiving the URL.
Update (Legacy SOBO)
#EnterTheCode -- thank you for the clarification that you provided in the comments. Your understanding of Legacy SOBO functionality is correct; that is, it does not require that you obtain an access token for the SOBO and it does not require that you obtain the SOBO user's password. You can simply include the X-DocuSign-Authentication request header to specify the username and password of your "service account", the integrator key, and the email address (or user ID) of the user whom you're issuing the API request on behalf of.
(Side Note: Although Legacy SOBO is apparently still supported, it's no longer recommended for service integrations. Instead, DocuSign now recommends this approach.)
Putting SOBO authentication technique aside though, the rest of my original answer still applies to your scenario. That is, to retrieve a URL that can be used to launch the sender (tagging) view for the specified Envelope, you'll need to use the Create Sender View operation. And, as mentioned previously, the URL that's returned by that operation will expire after a short amount of time -- so be sure to account for that in how you design your implementation.
Why you want to use SOBO, if you want someone to update the envelopes then you can add that user as first recipient in the envelope with recipienttype as "Allow To Edit" ("editors" in API term). With recipient type as "Allow to Edit", DocuSign will send an email to the recipient and then recipient has to login into his DocuSign account, after that user will be able to access the envelope and can do the editing of the envelope like doing tagging of document with DS Tabs, adding, removing recipients etc, in same way as "Sender View". In this way you don't need to create a webpage for embedded sending view.

Docusign RequestRecipientToken no longer working

I am using Docusign SOAP API for signing the documents. When using the RequestRecipientToken method, it returns the URL for signing the document, but it was no longer working and it asks docusign username and password.
How can I get a URL that will used in anytime and will do auto signing?
Typically if you want to bypass the login screen you'll either want to turn off the signer login requirement, or use an embedded signing session.
When creating the envelope, specify a clientUserId for the recipient. Then when you make the POST call to retrieve the recipient view, if you include that ID a URL will be sent back that will allow them to click and access their envelope without having to authenticate.
These URLs do expire after 5 minutes, so you can't really have a static link that works at all times.
DocuSign also does not support automatic signing, as the manual signing process is part of what validates an envelopes audit trail.

Resources