Java 屏幕签名文档未出现,且事件=ttl\u已过期
您好,我尝试使用DocuSign的嵌入式签名功能对文档进行签名,但当我发送请求时,屏幕签名文档不会出现,它会将我重定向到URL参数为event=ttl\u expired的页面Java 屏幕签名文档未出现,且事件=ttl\u已过期,java,api,docusignapi,Java,Api,Docusignapi,您好,我尝试使用DocuSign的嵌入式签名功能对文档进行签名,但当我发送请求时,屏幕签名文档不会出现,它会将我重定向到URL参数为event=ttl\u expired的页面 我知道,对于URL令牌,ttl(生存时间)=5分钟,有人能帮我吗?URL令牌仅在5分钟内有效。如果您被重新定向到URL参数为event=ttl_expired的屏幕,则表示您正试图从过期的URL令牌访问签名工作流 当URL令牌过期时,您需要生成一个新的令牌。你看过DocuSign的API演练吗?DocuSign的rest
我知道,对于URL令牌,ttl(生存时间)=5分钟,有人能帮我吗?URL令牌仅在5分钟内有效。如果您被重新定向到URL参数为event=ttl_expired的屏幕,则表示您正试图从过期的URL令牌访问签名工作流 当URL令牌过期时,您需要生成一个新的令牌。你看过DocuSign的API演练吗?DocuSign的restapi有9个常见用例,其中一个用于嵌入式签名。每个演练都有代码,向您展示如何用6种不同的语言(PHP、JavaScript、Java、C#、Objective-C、Python)完成该任务 有关漫游,请参见此处: 例如,由于PHP很容易从命令行运行,因此这里有一个完整的PHP程序,用于生成用于签名的有效URL令牌,该程序取自嵌入式签名API演练。只需从您的帐户输入您的凭据和有效的模板Id,这将适用于您:
<?php
// Input your info:
$integratorKey = '...';
$email = '...@....com';
$password = '...';
$name = "John Doe";
// copy the templateId of an existing template here
$templateId = "C9D9D181-CE57-.....................";
// construct the authentication header:
$header = "<DocuSignCredentials><Username>" . $email . "</Username><Password>" . $password . "</Password><IntegratorKey>" . $integratorKey . "</IntegratorKey></DocuSignCredentials>";
/////////////////////////////////////////////////////////////////////////////////////////////////
// STEP 1 - Login (retrieves baseUrl and accountId)
/////////////////////////////////////////////////////////////////////////////////////////////////
$url = "https://demo.docusign.net/restapi/v2/login_information";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("X-DocuSign-Authentication: $header"));
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 200 ) {
echo "error calling webservice, status is:" . $status;
exit(-1);
}
$response = json_decode($json_response, true);
$accountId = $response["loginAccounts"][0]["accountId"];
$baseUrl = $response["loginAccounts"][0]["baseUrl"];
curl_close($curl);
//--- display results
echo "accountId = " . $accountId . "\nbaseUrl = " . $baseUrl . "\n";
/////////////////////////////////////////////////////////////////////////////////////////////////
// STEP 2 - Create an envelope with an Embedded recipient (uses the clientUserId property)
/////////////////////////////////////////////////////////////////////////////////////////////////
$data = array("accountId" => $accountId,
"emailSubject" => "Hello World!",
"emailBlurb" => "This comes from PHP",
"templateId" => $templateId,
"templateRoles" => array(
array( "email" => $email, "name" => $name, "roleName" => "Signer1", "clientUserId" => "1001" )),
"status" => "sent");
$data_string = json_encode($data);
$curl = curl_init($baseUrl . "/envelopes" );
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string),
"X-DocuSign-Authentication: $header" )
);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 201 ) {
echo "error calling webservice, status is:" . $status . "\nerror text is --> ";
print_r($json_response); echo "\n";
exit(-1);
}
$response = json_decode($json_response, true);
$envelopeId = $response["envelopeId"];
curl_close($curl);
//--- display results
echo "Envelope created! Envelope ID: " . $envelopeId . "\n";
/////////////////////////////////////////////////////////////////////////////////////////////////
// STEP 3 - Get the Embedded Singing View
/////////////////////////////////////////////////////////////////////////////////////////////////
$data = array("returnUrl" => "http://www.docusign.com/devcenter",
"authenticationMethod" => "None", "email" => $email,
"userName" => $name, clientUserId => "1001"
);
$data_string = json_encode($data);
$curl = curl_init($baseUrl . "/envelopes/$envelopeId/views/recipient" );
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string),
"X-DocuSign-Authentication: $header" )
);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 201 ) {
echo "error calling webservice, status is:" . $status . "\nerror text is --> ";
print_r($json_response); echo "\n";
exit(-1);
}
$response = json_decode($json_response, true);
$url = $response["url"];
//--- display results
echo "Embedded URL is: \n\n" . $url . "\n\nNavigate to this URL to start the embedded signing view of the envelope\n";
?>
您可能需要对您的问题进行一些改进。很难理解您想要修复的内容和问题所在。您提到Java,但没有显示任何与正在发生或应该发生的事情相关的代码。我理解并重新表述了他们的问题。。。