首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >请求视图时信封收件人不匹配

请求视图时信封收件人不匹配
EN

Stack Overflow用户
提问于 2014-12-18 15:55:28
回答 1查看 749关注 0票数 0

当创建信封(稍后用于生成视图URL供签名者使用而不是接收电子邮件)时,我们遇到的问题是,我们指定的用户无效。

例如,这里有一个信封,里面有一个收信人,“小彼得休斯”。

代码语言:javascript
复制
Request URL: https://na2.docusign.net/restapi/v2/accounts/4476693/envelopes/f3a45945-f1ff-4731-a407-963a32378d77/recipients
------
{"IntegratorKey":"***","Password":"***","Username":"onboarding@impellam.com"}
Request headers: 
X-DocuSign-Authentication : {"IntegratorKey":"***","Password":"***","Username":"onboarding@impellam.com"}
Host : na2.docusign.net
Connection : Keep-Alive
------
Request body: 

------
Response headers: 
Strict-Transport-Security : max-age=7776000; includeSubDomains
Content-Length : 696
Cache-Control : no-cache
Content-Type : application/json; charset=utf-8
Date : Thu, 18 Dec 2014 15:26:42 GMT
------
Response body: 
{
  "signers": [
    {
      "name": "Peter Hughes Jr.",
      "email": "pwhughes@verizon.net",
      "recipientId": "1",
      "recipientIdGuid": "2461be9a-69d3-420d-b5f3-2c327af2f5f6",
      "requireIdLookup": "false",
      "userId": "0d5035dc-b70f-4026-8283-5c8d8903385a",
      "clientUserId": "1",
      "routingOrder": "1",
      "note": "",
      "roleName": "Applicant",
      "status": "sent",
      "templateLocked": "false",
      "templateRequired": "false"
    }
  ],
  "agents": [],
  "editors": [],
  "intermediaries": [],
  "carbonCopies": [],
  "certifiedDeliveries": [],
  "inPersonSigners": [],
  "recipientCount": "1",
  "currentRoutingOrder": "1"
}

当我们试图为这个用户设置一个视图时,会出现以下异常:

代码语言:javascript
复制
Request URL: https://na2.docusign.net/restapi/v2/accounts/4476693/envelopes/f3a45945-f1ff-4731-a407-963a32378d77/views/recipient
------
{"IntegratorKey":"***","Password":"***","Username":"onboarding@impellam.com"}
------
EXCEPTION
System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at DocusignView.Request.Send[T](String body) in C:\Users\johnathank\Desktop\docusigntest\DocusignView.cs:line 293
------
Request headers: 
X-DocuSign-Authentication : {"IntegratorKey":"***","Password":"***","Username":"onboarding@impellam.com"}
Content-Type : application/json
Host : na2.docusign.net
Content-Length : 143
Expect : 100-continue
------
Request body: 
{"authenticationMethod":"email","clientUserId":"1","email":"pwhughes@verizon.net","returnUrl":"www.impellam.com","userName":"Peter Hughes Jr."}
------
Response headers: 
Strict-Transport-Security : max-age=7776000; includeSubDomains
Content-Length : 152
Cache-Control : no-cache
Content-Type : application/json; charset=utf-8
Date : Thu, 18 Dec 2014 15:28:31 GMT
------
Response body: 
{
  "errorCode": "UNKNOWN_ENVELOPE_RECIPIENT",
  "message": "The recipient you have identified is not a valid recipient of the specified envelope."
}

我们实际上已经发现了问题,但还没有找到实现解决方案的好方法。在检查Docusign的信封时,我可以看到这个用户使用了"Peter W. Hughes Jr“这个名字。

因此,我试图发送另一个名为“PeterW.Hughes Jr.”的视图请求。相反,它成功了..。然而,提出了一个问题。我们如何才能知道所采用的用户名称是什么?它不在原始的信封数据中,而且从在iodocs.docusign.com浏览API之后,那里的任何方法似乎都没有给我用户采用的名称。

我已经阅读了另一种解决方案,该解决方案说我们可以在视图请求中而不是userName中提供一个userName,但是当我尝试这样做时,我会收到一个指示需要userName的错误。

代码语言:javascript
复制
Request URL: https://na2.docusign.net/restapi/v2/accounts/4476693/envelopes/f3a45945-f1ff-4731-a407-963a32378d77/views/recipient
------
{"IntegratorKey":"***","Password":"***","Username":"onboarding@impellam.com"}
------
EXCEPTION
System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at DocusignView.Request.Send[T](String body) in C:\Users\johnathank\Desktop\docusigntest\DocusignView.cs:line 295
------
Request headers: 
X-DocuSign-Authentication : {"IntegratorKey":"***","Password":"***","Username":"onboarding@impellam.com"}
Content-Type : application/json
Host : na2.docusign.net
Content-Length : 191
Expect : 100-continue
------
Request body: 
{"authenticationMethod":"email","clientUserId":"1","email":"pwhughes@verizon.net","returnUrl":"www.impellam.com","userId":"2461be9a-69d3-420d-b5f3-2c327af2f5f6","userName":"Peter Hughes Jr."}
------
Response headers: 
Strict-Transport-Security : max-age=7776000; includeSubDomains
Content-Length : 167
Cache-Control : no-cache
Content-Type : application/json; charset=utf-8
Date : Thu, 18 Dec 2014 15:52:06 GMT
------
Response body: 
{
  "errorCode": "INVALID_REQUEST_PARAMETER",
  "message": "The request contained at least one invalid parameter. A value was not found for parameter 'userName'."
}
EN

回答 1

Stack Overflow用户

发布于 2014-12-29 22:26:30

这只是一个问题,当多个信封在飞行中发送到相同的收件人名称,电子邮件和clientUserId组合。

一旦您发送收件人令牌,并且他们用不同的名称签名,对第二个信封使用相同的请求将因名称更改而失败。

最佳做法是为每个信封生成一个新的clientUserId,或者防止收件人在DocuSign帐户功能中更改其名称。该特性称为“签名采用配置”。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27550646

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档