Docusign 在嵌入式签名上不显示收件人视图,而是显示管理员视图

Docusign not showing recipientview on Embedded signing instead shows Admin View

过去 4 天我一直在为这个问题进行巡视,但无法弄清楚原因。 .使用 Python 和 JWT Auth ,当用户登录到我们的应用程序时,他们需要添加一些字段,并且需要将这些数据填写到 Docusign 模板中以供用户签名。在这里模拟不起作用。每次我打开 Docusign 文件时,它都会在我的凭据上打开它 - 管理员模式(我作为管理员获得同意)。不像下面指定的签名者那样。有人可以帮忙吗?

apiClient = DsClient.update_token()

apiClient.host = "https://na3.docusign.net" + "/restapi"     

   with open(path.join( '/app/templates/', 'sasa.pdf'), "rb") as file:
        content_bytes = file.read()
   base64_file_content = base64.b64encode(content_bytes).decode('ascii')

    # Create the document model
   document = Document( 
        document_base64 = base64_file_content,
        name = 'Example document', 
        file_extension = 'pdf', 
        document_id = 1 
    )
   signer = Signer( 
        email = 'xzr@gmail.com', name = 'abc',
        recipient_id = "1", routing_order = "1",
        client_user_id = '123',
        role_name = 'Signer'
    )
   
   
   sign_here = SignHere(  
            anchor_string="/sn1/", anchor_units="pixels",
            anchor_y_offset="10", anchor_x_offset="20"
        )


   signer.tabs = Tabs(sign_here_tabs = [sign_here])
  
   
   envelope_definition = EnvelopeDefinition(
    email_subject = "Please sign this document sent from the Python SDK",
    documents = [document],
    recipients = recipients.Recipients(signers = [signer]),
    status="sent"
    )

   envelope_api = EnvelopesApi(apiClient)
   
   results = envelope_api.create_envelope(session['account_id'], envelope_definition=envelope_definition)
   envelope_id = results.envelope_id
   
   recipient_view_request = RecipientViewRequest(
            authentication_method='None',
            client_user_id='123',  
            return_url="http://localhost:3000/",
            user_name='xyz', 
            email="xzr@gmail.com
            
        )
  
   results = envelope_api.create_recipient_view(account_id=session['account_id'],envelope_id=envelope_id,recipient_view_request=recipient_view_request)  
   return jsonify({"envelope_id": envelope_id,'redirect_url': results.url})

创建收件人视图

POST https://na3.docusign.net:8832/restapi/v2.1/accounts/f9bbb4d1-b163-40b9-9f24-8473123310dd/envelopes/dfa2eb5c-db75-45b3-b1b8-941c09750c01/views/recipient
Content-Length: 151
Content-Type: application/json
Accept: application/json
Accept-Encoding: identity
Authorization: Bearer [omitted]
Host: na3.docusign.net
User-Agent: Swagger-Codegen/v2.1/3.9.0rc1/python3
X-DocuSign-SDK: Python
X-Forwarded-For: 107.129.120.208
X-SecurityProtocol-Version: TLSv1.2
X-SecurityProtocol-CipherSuite: ECDHE-RSA-AES256-GCM-SHA384

{
    "authenticationMethod": "None", 
    "clientUserId": "123", "email": "xyz@gmail.com", 
    "returnUrl": "http://localhost:3000/", "userName": "Shilpa"
}

201 Created

Content-Type: application/json; charset=utf-8
Content-Length: 1466
X-DocuSign-TraceToken: eccb191e-e3f3-4cba-9f30-59f85dce54c5

{"url":"https://na3.docusign.net/Signing/MTRedeem/v1/eccb191e-e3f3-4cba-9f30-59f85dce54c5/na?29yaXRobSI6MCwiSGFzaFJvdW5....tw"}

我没有看到 templateId,所以您不是从模板创建信封吗?

不过,你这里的歌手中有一个角色元素:

role_name = 'Signer'

尝试删除上面的行,看看是否能解决这个问题。

另一个可以尝试的方法是打开隐身模式 window 供您的收件人签名,而不是使用具有 cookie 将您登录到管理员的浏览器。

问题是文档中有多个 anchor_string="/sn1/",所以它总是无法添加导致管理视图的签名选项卡。 Docusign 支持能够为我解决它。谢谢。

如果它能够为它抛出错误,那就太好了,而不是简单地在管理员或用户可以在表单上执行任何操作的视图中打开它。