我正在努力在我的应用上获取iFrame到嵌入式docusign的签名过程。
我试图根据这个教程来解决这个问题:
Docusign Embedded Signing using template
https://developers.docusign.com/esign-rest-api/guides/features/embedding
根据我的理解,如果你想嵌入你必须创建“动态创建信封”。所以你没有指定templateId正确吗?
所以我没有完全得到的是,我如何得到documentBase64字符串值?我必须手动拿到它?或者docusing api有一个会返回的端点吗?
另外我想知道,我添加到模板的自定义字段会发生什么?我不能用它们?
现在这是我发送的json:
{{的baseUrl}} /信封
{
"emailSubject":"This is a custom email subjet, look at the doc.",
"status":"sent",
"templateId":"a0847413-35ac-48ed-9ed6-9b7f96019eda",
"templateRoles":[
{
"email":"mauriciotaranto@email.com",
"name":"Mauricio T",
"clientUserId": "1234",
"roleName":"Test",
"routingOrder":"1",
"tabs": {
"textTabs": [
{
"tabLabel": "Custom",
"value": "This is a custom value"
},
{
"tabLabel": "NewCustom",
"value": "Another custom value added using API"
},
{
"tabLabel": "NewCustom1",
"value": "Last custom value added using API"
}
]
}
}
],
}
然后我转到收件人视图以获取URL:
{{的baseUrl}} /信封/ {{envelopeId}} /视图/接受者
{
"returnUrl": "https://www.google.com.uy",
"authenticationMethod": "None",
"email": "mauriciotaranto@email.com",
"userName": "Mauricio T",
"clientUserId": "1234"
}
据我所知,这种方式不允许用户唱歌文件。 需要用文档来代替。
你能告诉我这应该如何运作吗?
谢谢!
更新:
我手动将文档的字节解析为base64。并发送此json:
"status":"sent",
"emailSubject":"Envelope with Embedded Signer",
"documents":[
{
"documentId":"1",
"name":"contract.pdf",
"documentBase64":bytes
}
],
"recipients":{
"signers":[
{
"email":"mauriciotaranto@hotmail.com",
"name":"Mauricio T",
"recipientId":"1",
"clientUserId":"1234"
}
]
}
}
我更改标题,添加accept:application / json和content-type:multipart / from-data
这是我得到的回应:
{
"errorCode": "ENVELOPE_IS_INCOMPLETE",
"message": "The Envelope is not Complete. A Complete Envelope Requires Documents, Recipients, Tabs, and a Subject Line. Content-Type does not contain boundary parameter."
}
答案 0 :(得分:1)
您可以使用模板或传递文档的base64或两者同时使用复合模板以任何方式创建信封。当您发送模板时,您已经在模板中的文档上添加了签名者选项卡,因此您只需在创建信封时填充签名者详细信息(如姓名和电子邮件)和/或预先填充DS选项卡值。但是当您将文档作为base64发送时,您需要告诉DocuSign如何在文档上添加DS选项卡,方法是使用
嵌入式签名是一种签名,要实现您只需在签名者详细信息中添加clientUserId
即可。这可以通过使用模板或通过将文档作为base64或两者同时使用复合模板以两种方式完成。通过添加clientUserId获得嵌入式签名者后,您需要使用Recipient View URL按照qs中的说明生成签名URL,生成URL后,您将在IFrame或新选项卡中打开此URL。 / p>
在您分享的链接中包含非常小的代码段并且没有完整的示例时,请检查Complete Example,您会看到他们正在使用X / Y位置在文档上添加DS标签。< / p>