Alex
Alex

Reputation: 51

Docusign:- The recipient you have identified is not a valid recipient of the specified envelope

Am new to docusign and trying to use the embeding feature. Here's the steps I followed:

  1. Created a template with a sample document uploaded. For the Receipent and Routing section, i created one role but didnt give the email and name. Since i need to send the same template to different people
  2. Used the JAVA code exactly as in http://iodocs.docusign.com/APIWalkthrough/embeddedSigning
  3. Provided the required values such as integratorKey,username,password,recipientName,recipientEmail,templateId,roleName
  4. Am getting the below error and not sure how to resolve.

https://demo.docusign.net/restapi/v2/accounts/781990/envelopes/b61f50f3-632f-43d3-8f24-76758dbf31b7/views/recipient

Step 3: Generating URL token for embedded signing... API call failed, status returned was: 400 Error description:

<?xml version="1.0" encoding="UTF-8"?>
<errorDetails xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <errorCode>UNKNOWN_ENVELOPE_RECIPIENT</errorCode>
  <message>The recipient you have identified is not a valid recipient of the specified envelope.</message>
</errorDetails>

Upvotes: 3

Views: 3483

Answers (1)

Alex
Alex

Reputation: 51

Fixed it! There was an issue in the code given in that site. In step 2 it was given:

body = "<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" +
"<accountId>" + accountId + "</accountId>" +
"<status>sent</status>" +
"<emailSubject>DocuSign API Call - Signature request from template</emailSubject>" +
"<templateId>" + templateId + "</templateId>" +
"<templateRoles>" +
"<templateRole>" +
"<email>" + username + "</email>" + 
"<name>" + recipientName + "</name>" +
"<roleName>" + roleName + "</roleName>" +
"<clientUserId>1001</clientUserId>" +   // required for embedded sending (value is user-defined)
"</templateRole>" +
"</templateRoles>" +
"</envelopeDefinition>";

"<email>" + username + "</email>" is wrong. "<email>" + recipientEmail + "</email>" should be used instead.

Upvotes: 2

Related Questions