I'm currently sending an envelope on behalf of a user (let's call them User 1) and adding an editor role as the first recipient of that envelope (let's call them User 2). After the envelope is sent, I attempt to create an editor view for User 2.
When I create an editor view for User 2, the first time I use the URL it automatically redirects to the provided returnUrl
instead of the editor view for that envelope.
Why does this happen?
If I use the exact same URL a second time, it redirects to the editor view as expected.
Example Below:
The code I am writing uses the C# API, however, for sake of simplicity, I included a simple request that replicates the exact same problem.
Request:
POST: https://demo.docusign.net/restApi/v2/accounts/AccountId/envelopes/50545884-35da-4735-b076-f07883450146/views/edit
HEADER: X-DocuSign-Authentication {"Username":"API Account", "Password":"API Password", "SendOnBehalfOf": "User 2 Email", "IntegratorKey":"Integration Key"}
Content-Type: application/json
Body: { "returnUrl": "https://www.google.com/" }
Response:
{
"url": "https://demo.docusign.net/Member/StartInSession.aspx?StartConsole=1&t=5dd34549-b5a1-4ccf-b039-243ce06e264d&DocuEnvelope=50545884-35da-4735-b076-f07883450146&send=1"
}
The first time I navigate to the URL I get redirected to Google. I copy the exact same url
again and the second time I redirect to the expected editor view for that envelope.
Updated Details on Envelope Creation:
The header used during the creation of the envelope is similar to below:
HEADER: X-DocuSign-Authentication {"Username":"API Account", "Password":"API Password", "SendOnBehalfOf": "User 1 Email", "IntegratorKey":"Integration Key"}
Easy Way to Replicate Issue:
Login into DocuSign.
Using POSTMAN:
POST: https://demo.docusign.net/restApi/v2/accounts/AccountId/envelopes/{envelopeIdFromStep6}/views/edit
HEADER: X-DocuSign-Authentication {"Username":"API Account", "Password":"API Password", "SendOnBehalfOf": "testeditor@mailinator.com", "IntegratorKey":"Integration Key"}
Content-Type: application/json
Body: { "returnUrl": "https://www.google.com/" }
url
is returned: https://demo.docusign.net/Member/StartInSession.aspx?StartConsole=1&t=cda7bdd2-0ce7-4478-a659-7984bf982687&DocuEnvelope={envelopeIdFromStep6}&send=1
答案 0 :(得分:0)
在与DocuSign支持人员交谈后,确定必须两次导航到编辑器的URL是一个错误。我们试图在服务器端“丢弃” URL的首次使用,但是,发现使用了cookie。这使得无法在客户端上第二次使用URL。
唯一值得注意的解决方法是通过客户端上的隐藏iFrame导航到URL,这将无法重定向,但会在浏览器中建立cookie,然后再次使用URL再次重定向浏览器。从最终用户的角度来看,该功能将正常运行。
此问题的修复程序目前在工程团队的手中,尚不知道发布或修复的日期。