且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

信封的签名者URL-调用docusign API并收到400错误的请求错误

更新时间:2022-10-14 19:02:39

我查看了您最近的访问量,发现与缺少的returnUrl有关的错误


我认为此调用不需要userId(不是clientUserId),因此,如果这不起作用,您可能也希望删除该部分。 / p>

尝试将其更改为:


{
clientUserId: fc86d3e0-2d5c-4ebb-9765-cb8b0e011ee4,
userId: fc86d3e0-2d5c-4ebb-9765-cb8b0e011ee4,
userName: Manoj Sharma,
email: manoj.sharma @ ebix.com,
接收者ID: 1,
authenticationMethod:无,
returnUrl: https:// www .docuisgn.com
}


如果通话中存在其他所需的详细信息,则应开始工作。让我们知道您是否仍然看到错误消息。


致谢


Matt K


编辑:


问题分为两个部分。


  1. 创建信封时,您不会提供收件人的clientUserId。该ID可以是数字或字母的组合,通常少于12个字符。



  2. 在创建对receiveViewViewToken的请求时,您指定的clientUserId是预期收件人的apiUserName。 apiUserName是一个特定于用户的GUID,已分配给您帐户中的特定用户。为了使receiverViewToken请求得以通过,clientUserId需要在信封上已经存在的收件人和您在调用中指定的用户详细信息之间进行匹配,而该用户详细信息与此APIUserName无关。



您的示例:


{
clientclientId: fc86d3e0-2d5c-4ebb- 9765-cb8b0e011ee4,
userId: fc86d3e0-2d5c-4ebb-9765-cb8b0e011ee4,
userName: Manoj Sharma,
email : manoj.sharma@ebix.com,
recipientId: 1,
authenticationMethod:无,
returnUrl: ; https://www.docuisgn.com;
}


如果将其更改为:


{
userName:" Manoj Sharma,
电子邮件: manoj.sharma@ebix.com,
recipientId: 1,
authenticationMethod:无 ,
returnUrl: https://www.docuisgn.com
}


但是,如果您打算让收件人被束缚,则只需在信封定义中提供与请求令牌时相同的clientUserId。它不必是APIUsername,它可以像5678一样简单。


For requirement - Signer URL - we want to get signer URL for envelope. Calling below API and but API throw 400 bad request message.

POST /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient

I tried with following both request.

{"clientUserId":"fc86d3e0-2d5c-4ebb-9765-cb8b0e011ee4","userId":"fc86d3e0-2d5c-4ebb-9765-cb8b0e011ee4","userName":"Manoj Sharma","email":"manoj.sharma@ebix.com","recipientId":"1","authenticationMethod":"None"}

OR

{"clientUserId":"fc86d3e0-2d5c-4ebb-9765-cb8b0e011ee4","email":"akshat.singhal@ebix.com","recipientId":"2","authenticationMethod":"None"}

Please help what is wrong in above request.

I've taken a look at some of your recent traffic, I see a combination of errors relating to a missing returnUrl or userName.

I don't believe the userId (not the clientUserId) is required for this call, so you may want to remove that portion as well if this doesn't work.

Try changing it to:

{ "clientUserId": "fc86d3e0-2d5c-4ebb-9765-cb8b0e011ee4", "userId": "fc86d3e0-2d5c-4ebb-9765-cb8b0e011ee4", "userName": "Manoj Sharma", "email": "manoj.sharma@ebix.com", "recipientId": "1", "authenticationMethod": "None", "returnUrl":"https://www.docuisgn.com" }

If the other required details in the call are present it should start working. Let us know if you still see an error message.

Regards,

Matt K

Edit:

The issue is two-parts.

  1. When your envelopes are being created, you're not supplying a clientUserId for the recipient. The ID can be a combination of numbers or letters, usually less than 12 characters long.

  2. When you're creating the request for the recipientViewToken, the clientUserId you're specifying is the apiUserName of the intended recipient. The apiUserName is a user-specific GUID that's assigned to a specific user on your account. In order for the recipientViewToken requests to go through, the clientUserId needs to match up between the recipient already present on the envelope and the user details you specify in the call, which is agnostic of this APIUserName.

Your example:

{ "clientUserId": "fc86d3e0-2d5c-4ebb-9765-cb8b0e011ee4", "userId": "fc86d3e0-2d5c-4ebb-9765-cb8b0e011ee4", "userName": "Manoj Sharma", "email": "manoj.sharma@ebix.com", "recipientId": "1", "authenticationMethod": "None", "returnUrl": "https://www.docuisgn.com" }

Will most likely work if you change it to:

{ "userName": "Manoj Sharma", "email": "manoj.sharma@ebix.com", "recipientId": "1", "authenticationMethod": "None", "returnUrl": "https://www.docuisgn.com" }

However, if you intend for your recipients to be captive, you just need to supply the same clientUserId in the envelope definitions that you do when requesting the token. It doesn't have to be an APIUsername, it can be as simple as 5678.