代码之家  ›  专栏  ›  技术社区  ›  gornvix

在DocuSign签名过程中添加第二个收件人

  •  0
  • gornvix  · 技术社区  · 4 年前

    我换了些文件 Sample code

    with open(os.path.join(app_path, file_name_path), 'rb') as file:
        content_bytes = file.read()
    base64_file_content = base64.b64encode(content_bytes).decode('ascii')
    document = Document(
        document_base64=base64_file_content,
        name='Example document',
        file_extension='pdf',
        document_id=master_id
    )
    signer = Signer(  # this works on its own
        email=signer_email,
        name=signer_name,
        recipient_id='1',
        routing_order='1',
        client_user_id=client_user_id,
    )
    signer2 = Signer(
        email='secondperson@example.com',
        name='Some Guy',
        recipient_id='2',
        routing_order='2',
        client_user_id=client_user_id,
    )
    sign_here = SignHere(
        document_id=str(master_id),
        page_number='1',
        recipient_id='1',
        tab_label='SignHereTab',
        x_position='195',
        y_position='147')
    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(signers=[signer, signer2]),
        status='sent'
    )
    api_client = ApiClient()
    api_client.host = base_path
    api_client.set_default_header('Authorization', 'Bearer ' + access_token)
    envelope_api = EnvelopesApi(api_client)
    results = envelope_api.create_envelope(account_id,
        envelope_definition=envelope_definition)
    envelope_id = results.envelope_id
    recipient_view_request = RecipientViewRequest(
        authentication_method=authentication_method,
        client_user_id=client_user_id,
        recipient_id='1',
        return_url=base_url + '/docusign-return',
        user_name=signer_name,
        email=signer_email
    )
    results = envelope_api.create_recipient_view(account_id, envelope_id,
                                                 recipient_view_request=
                                                 recipient_view_request)
    

    “的”secondperson@example.com“地址已添加到DocuSign,我激活了他们的DocuSign帐户。当我运行这段代码时,签名过程适用于第一个用户。但是没有电子邮件发送到“secondperson@example.com并且该文件不会出现在第二个人的文档上,标记为“需要操作”。我做错什么了?

    更新 文档状态在DocuSign沙盒上显示为“等待其他人”,但是当我转到第二个帐户时,“actionrequired”下没有任何内容。

    0 回复  |  直到 4 年前
        1
  •  1
  •   Larry K    4 年前

    我看到的几个问题:

    client_user_id 属性表示嵌入的签名者

    因为第二个签名者拥有 客户端用户标识 属性集,它们被视为嵌入的签名者。结果他们会的

    如果你想让第二个签名者成为 remote signer (从DocuSign收到签名仪式的电子邮件邀请),然后删除 客户端用户标识

    signer2 = Signer(
        email='secondperson@example.com',
        name='Some Guy',
        recipient_id='2',
        routing_order='2',
    )
    

    签名者不需要DocuSign帐户

    在你的问题上你这么说

    别用同样的方法

    有时,您确实需要一个信封的多个嵌入签名者。当你这样做的时候,不要用同样的方法 客户端用户标识 id 在你的web应用中。如果您没有在web应用中分配id,则使用签名者的电子邮件作为客户端用户id。如果您没有他们的电子邮件,则使用 name@example.com .

    新增:签约仪式API认证

    既然签名者不付款,也不需要DocuSign上的用户帐户,那么开发人员的应用程序如何调用 EnvelopeViews:createRecipient 获取签名者将使用的签名仪式URL?

    答案是使用“系统帐户”--在DocuSign帐户中创建一个用户,该帐户通常表示应用程序或部门。如sales@your_company.com。

    然后,通过使用JWT授权来模拟sales@your_company.com销售系统用户。

    应用程序使用生成的访问令牌调用 恩维lopeViews:createRecipient

    根据发送信封的用户的不同,系统帐户可能需要也可能不需要管理权限。