Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/358.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.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
Python 在DocuSign签名过程中添加第二个收件人_Python_Python 3.x_Docusignapi - Fatal编程技术网

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

Python 在DocuSign签名过程中添加第二个收件人,python,python-3.x,docusignapi,Python,Python 3.x,Docusignapi,我更改了一些DocuSign,以便在签名过程中添加第二个收件人。为了让我的网站用户签名,另一(第二)个人希望收到一封电子邮件,要求对文件进行进一步签名。但是,我的代码不起作用,我不知道是否正确添加了第二个收件人: with open(os.path.join(app_path, file_name_path), 'rb') as file: content_bytes = file.read() base64_file_content = base64.b64encode(content

我更改了一些DocuSign,以便在签名过程中添加第二个收件人。为了让我的网站用户签名,另一(第二)个人希望收到一封电子邮件,要求对文件进行进一步签名。但是,我的代码不起作用,我不知道是否正确添加了第二个收件人:

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沙箱上显示为“等待其他人”,但当我转到第二个帐户时,“所需操作”下没有任何内容。我看到了几个问题:

client\u user\u id
属性表示嵌入的签名者 由于第二个签名者设置了
client\u user\u id
属性,因此他们被视为嵌入式签名者。因此,他们不会收到参加签字仪式的电子邮件邀请

如果希望第二个签名者是
远程签名者
(从DocuSign接收签名仪式的电子邮件邀请),请删除
客户端用户id
属性

乙二醇

签名者不需要DocuSign帐户 在你的问题中,你是这么说的

"secondperson@example.com“地址已添加到DocuSign,我激活了他们的DocuSign帐户

但是(一般来说)签名者不需要使用DocuSign帐户。(有些情况下他们会这样做,例如第11部分合规性签名。)

对于多个签名者,不要使用相同的
客户端\用户\ id
有时,一个信封确实需要多个嵌入式签名者。当您这样做时,不要对多个签名者使用相同的
客户\用户\ id
。这是糟糕的形式。在web应用程序中使用每个签名者的
id
。如果您没有在web应用中分配id,则使用签名者的电子邮件作为客户端用户id。如果您没有他们的电子邮件,则使用
name@example.com

新增:签约仪式API认证 既然签名者不付费,也不需要DocuSign上的用户帐户,那么开发人员的应用程序如何调用以获取签名者将使用的签名仪式URL

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

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

应用程序使用生成的访问令牌调用以获取签名仪式URL


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

但您不需要帐户ID来开始签名仪式吗?帐户ID是否与DocuSign中的人员关联?RSA私钥是否需要采用PEM或DER格式?它只是在API中显示“二进制”。所以我猜它不是文本格式的。我提出了一个关于RSA密钥的新问题。
signer2 = Signer(
    email='secondperson@example.com',
    name='Some Guy',
    recipient_id='2',
    routing_order='2',
)