Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Docusignapi 如何在DocuSign中加载带有信封ID的嵌入式签名请求?_Docusignapi - Fatal编程技术网

Docusignapi 如何在DocuSign中加载带有信封ID的嵌入式签名请求?

Docusignapi 如何在DocuSign中加载带有信封ID的嵌入式签名请求?,docusignapi,Docusignapi,我有一个演示帐户设置的API。到目前为止,我已经能够创建我的演示联系人收到的签名请求。我想使用API的嵌入式签名部分来加载信封的收件人视图,但是我得到了这两个响应中的任何一个(如下所示) 我有信封ID,我知道(唯一)收件人的电子邮件和用户名,我可以在沙盒UI中看到此信息 我的请求具有用于创建信封的相同JSON授权密钥字符串 以下是我发送的两个示例有效载荷(X的替换敏感信息): 请求: POST /restapi/v2/accounts/110XXXX/envelopes/7dee22f3-90e

我有一个演示帐户设置的API。到目前为止,我已经能够创建我的演示联系人收到的签名请求。我想使用API的嵌入式签名部分来加载信封的收件人视图,但是我得到了这两个响应中的任何一个(如下所示)

我有信封ID,我知道(唯一)收件人的电子邮件和用户名,我可以在沙盒UI中看到此信息

我的请求具有用于创建信封的相同JSON授权密钥字符串

以下是我发送的两个示例有效载荷(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"
}
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: 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."
}
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."
}
-----或-----

请求:

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"
}
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: 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."
}
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."
}
我建议遵循DocuSign Developer Center中的和文档。“快速入门”中有一个完整的部分解释嵌入式签名,还有一个功能页面专门介绍您需要的所有信息


步骤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"
}

API方法:

要进行嵌入式签名,您肯定需要包含clientUserID。考虑到您所说的所使用的凭据,我建议对实际收件人数据进行健全检查,以确保您指定的名称/电子邮件@/clientUserID与您认为与此签名者关联的名称/电子邮件@/clientUserID完全相同。我建议对/envelope//recipients端点执行一次GET,并检查内容它们确实是相同的。
clientUserID
应该包含什么?当您通过API创建信封时,为收件人指定clientUserID意味着签名者/收件人只能通过嵌入签名对此进行签名。他们将不会收到DocuSign发送的开始签名的电子邮件。简而言之,如果clientUserID存在=嵌入签名,则clientUserID不存在=远程/电子邮件发起的签名。我建议您查看我们的文档以了解更多详细信息re:clientUserID:刚刚发布了一个冗长的答案,希望这有助于解决问题。