Docusignapi 找不到DocuSign资源错误
我现在得到这个错误。向我发送了一封电子邮件,要求我签名。当我点击查看文档按钮时,我会看到一个无法绕过的“此连接不受信任”屏幕。如果我转到docusign.com并单击ACCESS DOCUMENTS链接,系统会要求我输入安全代码,并收到消息“输入了无效的电子邮件文档代码。请重试。” 代码现在显示:Docusignapi 找不到DocuSign资源错误,docusignapi,Docusignapi,我现在得到这个错误。向我发送了一封电子邮件,要求我签名。当我点击查看文档按钮时,我会看到一个无法绕过的“此连接不受信任”屏幕。如果我转到docusign.com并单击ACCESS DOCUMENTS链接,系统会要求我输入安全代码,并收到消息“输入了无效的电子邮件文档代码。请重试。” 代码现在显示: Dim docFile As String = "" + docName.Substring(41, (docName.Length() - 41)) + "\" + ""
Dim docFile As String = "" + docName.Substring(41, (docName.Length() - 41)) + "\" + ""
'Overwrite the default content-type header and set a boundary marker
request.ContentType = "multipart/form-data; boundary=BOUNDARY"
request.ServicePoint.Expect100Continue = False
request.KeepAlive = False
'Start building the multipart request body
Dim asciLN As String = Chr(10)
Dim asciCR As String = Chr(13)
Dim requestBodyStart As String = asciCR + asciLN + asciCR + asciLN + "--BOUNDARY" + asciCR + asciLN + _
"Content-Type: application/xml" + asciCR + asciLN + _
"Content-Disposition: form-data" + asciCR + asciLN + _
asciCR + asciLN + _
xmlBody + asciCR + asciLN + asciCR + asciLN + "--BOUNDARY" + asciCR + asciLN + _
"Content-Type: application/pdf" + asciCR + asciLN + _
"Content-Disposition: file; filename=\" + docFile + "; documentId=1" + asciCR + asciLN + _
asciCR + asciLN
Dim requestBodyEnd As String = asciCR + asciLN + "--BOUNDARY--" + asciCR + asciLN + asciCR + asciLN
生成请求:
--BOUNDARY
Content-Type: application/xml
Content-Disposition: form-data
<envelopeDefinition xmlns="http://www.docusign.com/restapi"><status>sent</status><emailSubject>DocuSign API - Embedded Signing example</emailSubject><documents><document><documentId>1</documentId><name>\\10.1.11.100\SecureDocs\EnrollmentForms\CrystalReport1.pdf</name></document></documents><recipients><signers><signer><recipientId>1</recipientId><email>hmitchell@ata.edu</email><name>Alexandra Adams</name><tabs><signHereTabs><signHere><xPosition>100</xPosition><yPosition>100</yPosition><documentId>1</documentId><pageNumber>1</pageNumber></signHere></signHereTabs></tabs></signer></signers></recipients></envelopeDefinition>
--BOUNDARY
Content-Type: application/pdf
Content-Disposition: file; filename=\"CrystalReport1.pdf\"; documentId=1
%PDF-1.7
%����
1 0 obj
<<
/Type /Catalog
/Pages 2 0 R
/PageMode /UseNone
/ViewerPreferences <<
/FitWindow true
/PageLayout /SinglePage
/NonFullScreenPageMode /UseNone
——边界
内容类型:application/xml
内容配置:表单数据
sentDocuSign API-嵌入式签名示例1\\10.1.11.100\SecureDocs\EnrollmentForms\CrystalReport1。pdf1hmitchell@ata.eduAlexandra亚当斯10011
--边界
内容类型:application/pdf
内容配置:文件;文件名=\“CrystalReport1.pdf\”;documentId=1
%PDF-1.7
%����
10 obj
我能想到两种可能性。首先,我在您正在构建的XML的文档元素中看到:
<documents>
<document>
<documentId>1</documentId>
<name>\\10.1.11.100\SecureDocs\EnrollmentForms\CrystalReport1.pdf</name>
</document>
因此,如果您正在开发人员沙箱中进行集成,并使用REST API的版本2,并且您的帐户id为12345,那么它应该是:
http://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes
http://demo.docusign.net/restapi/v2/accounts/12345/envelopes
您正在导入PDF,但未导入内容。你需要对它进行base64编码或获取内容本身。谢谢Andrew,为了简洁起见,我的帖子中没有包含所有编码。该文档不会在FIrefox中显示,但会在IE中显示。感谢您的回复,我的URL看起来与您所说的完全一样。更新:如果我在IE中打开电子邮件链接,文档将显示以供签名,但我仍然会在回复中找到未找到的资源。我在上收到错误。以下是请求:(下一条评论)发布HTTP/1.1 X-DocuSign-Authentication:m@ata.edux我接受:应用程序/xml内容类型:应用程序/xml主机:demo.docusign.net内容长度:280电子邮件m@ata.edudocusign.com 1 AA以下是代码:xmlBody=“+”电子邮件“+”电子邮件+”++“docusign.com”++“1”++“收件人姓名+++”如果我想在我自己的问题中添加超过评论限制的评论,我应该单击“回答你的问题”吗?
http://demo.docusign.net/restapi/v2/accounts/12345/envelopes