是docusign的新手,并尝试使用嵌入功能。这是我遵循的步骤:
integratorKey,username,password,recipientName,recipientEmail,templateId,roleName
步骤3:为嵌入式签名生成URL令牌... API调用失败,返回的状态为:400 错误说明:
<?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>
答案 0 :(得分:1)
修正了它!该网站提供的代码存在问题。在第2步中给出了:
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>"
错了。
应该使用"<email>" + recipientEmail + "</email>"
代替。