作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有模拟账户设置的 API。到目前为止,我已经能够创建我的演示联系人收到的签名请求。我想使用 API 的嵌入式签名部分来加载信封的收件人 View ,但我得到了这两个响应之一(如下所示)。
我有信封 ID,我知道(唯一)收件人的电子邮件和用户名,我可以在沙盒 UI 中看到此信息。
我的请求具有用于创建信封的相同 JSON 授权 key 字符串。
这是我发送的两个示例有效负载(X 替换敏感信息):
要求:
POST /restapi/v2/accounts/110XXXX/envelopes/7dee22f3-90e6-44b0-be6b-XXXXXXX/views/recipient HTTP/1.1
X-DocuSign-Authentication: {"Username":"a312a32d-df78-423e-b916-XXXXXXXXX","Password":"XXXXXX","IntegratorKey":"CONN-18a3c56f-f776-40db-8e33-XXXXXXXXX"}
Accept: application/json
Content-Type: application/json
Cookie: BIGipDocuSign=!aI+3n7V3fB0xBxEb7loYjpEeRwCxTKC4na93ET3RH8aETpEeGTqTaKaY1y6ui+nhmrX85Xa90CfKgfk=
Host: demo.docusign.net
Connection: close
Content-Length: 186
{
"authenticationMethod": "email",
"email": "adam@example.com",
"returnUrl": "http://lvh.me:3000",
"userName": "John Smith",
"clientUserId":"21"
}
HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Content-Length: 152
Content-Type: application/json; charset=utf-8
X-RateLimit-Reset: 1436846400
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 998
Date: Tue, 14 Jul 2015 03:43:01 GMT
Connection: close
Set-Cookie: BIGipDocuSign=!aI+3n7V3fB0xBxEb7loYjpEeRwCxTKC4na93ET3RH8aETpEeGTqTaKaY1y6ui+nhmrX85Xa90CfKgfk=;secure; path=/
Strict-Transport-Security: max-age=31536000; includeSubDomains
{
"errorCode": "UNKNOWN_ENVELOPE_RECIPIENT",
"message": "The recipient you have identified is not a valid recipient of the specified envelope."
}
POST /restapi/v2/accounts/110XXXX/envelopes/7dee22f3-90e6-44b0-be6b-XXXXXXX/views/recipient HTTP/1.1
X-DocuSign-Authentication: {"Username":"a312a32d-df78-423e-b916-XXXXXXXXX","Password":"XXXXXX","IntegratorKey":"CONN-18a3c56f-f776-40db-8e33-XXXXXXXXX"}
Accept: application/json
Content-Type: application/json
Cookie: BIGipDocuSign=!aI+3n7V3fB0xBxEb7loYjpEeRwCxTKC4na93ET3RH8aETpEeGTqTaKaY1y6ui+nhmrX85Xa90CfKgfk=
Host: demo.docusign.net
Connection: close
Content-Length: 158
{
"authenticationMethod": "email",
"email": "adam@example.com",
"returnUrl": "http://lvh.me:3000",
"userName": "John Smith"
}
HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Content-Length: 140
Content-Type: application/json; charset=utf-8
X-RateLimit-Reset: 1436846400
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 997
Date: Tue, 14 Jul 2015 03:53:06 GMT
Connection: close
Set-Cookie: BIGipDocuSign=!J6eG9xlLFCmIIZgb7loYjpEeRwCxTPgRydEJMtaaTaMNaqpZpXKRTbRGctfwEWaI3Ptas3QeaupEj2o=;secure; path=/
Strict-Transport-Security: max-age=31536000; includeSubDomains
{
"errorCode": "ACCOUNT_NOT_AUTHORIZED_FOR_ENVELOPE",
"message": "This account is not authorized to access the requested envelope."
}
最佳答案
我建议关注 Quickstart以及在 DocuSign 开发人员中心找到的文档。快速入门中有一个完整的部分解释了嵌入式签名,还有一个专用于 Embedding functionality 的功能页面。里面有你需要的所有信息。
第 1 步:使用嵌入式收件人创建信封
要将收件人指定为嵌入式(意味着他们不会通过电子邮件而是通过您的应用程序发起请求),您只需设置收件人的 clientUserId
属性设置为非空值 - 您的第一个示例看起来不错,将其设置为 21
.一个典型的包络定义如下:
{
"documents": [{
"documentBase64": "<Base64BytesHere>",
"documentId": "1",
"name": "Test"
}],
"emailSubject": "Testing",
"recipients": {
"signers": [{
"name": "John Doe",
"email": "john@email.com",
"clientUserId": "21",
"recipientId": "1"
}]
},
"status": "sent"
}
userName
,
email
, 和
clientUserId
.请注意,名称字段名为
userName
在此 API 中,而不仅仅是
name
用于创建信封 API。
{
"authenticationMethod": "email",
"userName": "John Doe",
"email": "john@email.com",
"clientUserId": "21",
"returnUrl": "http://www.google.com"
}
关于docusignapi - 如何在 DocuSign 中加载带有信封 ID 的嵌入式签名请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31397381/
我是一名优秀的程序员,十分优秀!