2
votes

I have web app that I am adding DocuSign Embedded Signing to that is used both on Desktop as well as Mobile device. I have been told that the iFrame solution of SOAP API is unreliable (as I have also experienced). I am attempting to implement using REST API. Here is my status:

  1. I have successfully executed the REST API Sample for Embedded Signing from the API Walkthrough.
  2. I have successfully adapted the envelop to include two different signers, and then successfully completed the signing process for signer1.
  3. How do I get the second signer signing session in a browser window?

Is there a sample (or secret sauce) for how to get the embedded signing session for signer2 to launch?

MANY MANY thanks in advance.

1

1 Answers

1
votes

To generate a URL token for the second recipient you follow the same process you used for the first recipient. You make the same http POST request but simply reference the email, username, and clientUserId of your second recipient.

For instance, when you were generating the URL for your first recipient, you probably had a request body similar to this:

{
    "returnUrl": "http://www.docusign.com/devcenter",
    "authenticationMethod": "None",
    "email": "[email protected]",
    "userName": "Name 1",
    "clientUserId": "1001"
}

The DocuSign system uses the combination of their email, userName and clientUserId to uniquely identify this embedded recipient (also known as a captive recipient). So when you add your second recipient to the envelope you should have given them their own clientUserId value that's different from the first recipient. Then, the system will be able to identify them and generate a URL token for this second recipient.

For example, if you added a second recipient to the envelope with the following information:

{
    "email": "[email protected]",
    "name": "Second Recipient",
    "roleName": "Signer1",
    "clientUserId": "1002"
}

Then you'll want to make the same http POST call you made for the first recipient, but with the following information instead:

{
    "returnUrl": "http://www.docusign.com/devcenter",
    "authenticationMethod": "None",
    "email": "[email protected]",
    "userName": "Second Recipient",
    "clientUserId": "1002"
}