Common API Tasksđ: Request a signature from an in-person signer
Learn how to use the eSignature API to request a signature from an in-person signer
Welcome to a spectacular new edition of the CATđ (Common API Tasks) blog series. The CAT blogs provide all you need to complete small, specific, SDK-supported tasks using one of our APIs. You can find all articles in this series on the Docusign Developer Blog.Â
In this edition Iâm going to discuss Docusign support for in-person signers and how you can use this feature in your integrations. First, letâs review what an in-person signer is, and what it is good for. In many real-life situations, the signer of the envelope is not the same person that uses a device and is able to immediately start a signing session. For example, say youâre going snorkeling, and you need to sign a waiver. Youâre standing there in the dive shop ready to plunge into the ocean, so understandably you donât have your laptop or even your phone on you. The store manager does, but she is not the one that needs to sign. She will act as your host for this transaction: she will receive the envelope and then give you her tablet so you can sign on her tablet. Note the terminology, because itâs important. One person is the host, and the host must be available to receive the envelope via either remote signing (email) or embedded signing. The hostâs email address must be provided in any case. The signer is a different person: for the signer, you only need to provide their name. You can provide their email address, too, if you know it; but itâs optional.
Letâs do our usual round of code snippets. These only show the code necessary to create the Recipients object. To send a valid envelope, you will still need to have one or more documents, as well as tabs and a subject line. (see How to request a signature by email for code examples)
C#
InPersonSigner inPersonSigner = new InPersonSigner
{
HostEmail = "host@domain.com",
HostName = "Heather Host",
Email = "signer@domain.com", // Optional
Name = "Sue Signer",
RecipientId = "1",
ClientUserId = "1001", // Optional; specifying a ClientUserId means no email message will be sent to the host
RoutingOrder = "1",
};
Recipients recipients = new Recipients
{
InPersonSigners = new List<inpersonsigner> { inPersonSigner }
};
</inpersonsigner>
Java
InPersonSigner inPersonSigner = new InPersonSigner();
inPersonSigner.setHostEmail("host@domain.com");
inPersonSigner.setHostName("Heather Host");
inPersonSigner.setEmail("signer@domain.com"); // Optional
inPersonSigner.setName("Sue Signer");
inPersonSigner.setRecipientId("1");
inPersonSigner.setClientUserId("1001"); // Optional; specifying a ClientUserId means no email message will be sent to the host
inPersonSigner.setRoutingOrder("1");
Recipients recipients = new Recipients();
recipients.setInPersonSigners(Arrays.asList(inPersonSigner));
Node.js
let inPersonSigner = docusign.InPersonSigner.constructFromObject({
hostEmail : 'host@domain.com',
hostName : 'Heather Host',
email : 'signer@domain.com', // Optional
name : 'Sue Signer',
recipientId : '1',
clientUserId : '1001', // Optional; specifying a clientUserId means no email message will be sent to the host
routingOrder : '1',
});
let recipients = docusign.Recipients.constructFromObject({
inPersonSigners: [inPersonSigner],
});
PHP
$in_person_signer = new Signer([
'host_email' => 'host@domain.com',
'host_name' => 'Heather Host',
'email' => 'signer@domain.com', # Optional
'name' => 'signer_name',
'recipient_id' => "1",
'client_user_id' => '1001', # Optional; specifying a client_user_id means no
'routing_order' => "1"
]);
$recipients = new Recipients(['in_person_signers' => [$in_person_signer]);
Python
in_person_signer = InPersonSigner(
host_email="host@domain.com",
host_name="Heather Host",
email="signer@domain.com", # Optional
name="Sue Signer",
recipient_id="1",
client_user_id="1001", # Optional; specifying a client_user_id means no email message will be sent to the host
routing_order="1",
)
recipients = Recipients(in_person_signers=[in_person_signer])
Ruby
in_person_signer = DocuSign_eSign::in_person_signer.new
in_person_signer.host_email = 'host@domain.com'
in_person_signer.host_name = 'Heather Host'
in_person_signer.email = 'signer@domain.com' # Optional
in_person_signer.name = 'Sue Signer'
in_person_signer.recipient_id = '1'
in_person_signer.client_user_id = '1001' # Optional; specifying a client_user_id means no email message will be sent to the host
in_person_signer.routing_order = '1'
recipients = DocuSign_eSign::Recipients.new( inPersonSigners: [inPersonSigners] )
And thatâs a wrap! I hope you found it useful. If you have any questions, comments, or suggestions for topics for future Common API Tasks posts, feel free to email me. Until next time...
Additional resources
Inbar Gazit has been with Docusign since 2013 in various engineering roles. Since 2019 he has focused on developer content. Inbar works on code examples including the launchers, available on GitHub in eight languages, and helps build sample apps showcasing the various Docusign APIs. He is also active on StackOverflow, answering your questions. Inbar can be reached at inbar.gazit@docusign.com.
Related posts