I want to embedd a widget in my application and be able to add 2 signers(recepients) to it without the sender required to sign the document. The EchoSign docuemtation says that "In the case of a reusable document that needs to be signed by multiple people, it is more efficient to call createEmbeddedWidget once and then call personalizeEmbeddedWidget for each signer."
I've tried this method but when I call the personalizeEmbeddedWidget function second time, it replaces the first recepient with the latest one instead of adding a new.
code:
$r = $s->createEmbeddedWidget(array(
'apiKey'=>ApiKey,
'widgetInfo'=>array(
'name'=>'Contract',
'fileInfos' => array(
'FileInfo' => array(
array(
'file' => $file2,
'fileName' => $filename2,
'mimeType' => 'text/html',
),
)
),
'widgetCompletionInfo'=>array(
'url'=> return-to-url,
'deframe'=> true,
),
'signatureFlow'=>'SENDER_SIGNATURE_NOT_REQUIRED',
)
));
if($r->embeddedWidgetCreationResult->success == 1){
$widgetCreationScript = $r->embeddedWidgetCreationResult->javascript;
$re = $s->personalizeEmbeddedWidget(array(
'apiKey'=>$ApiKey,
'widgetJavascript' => $widgetCreationScript,
'personalizationInfo' => array(
'email' => 1st_email_address,
)
));
$widgetScript = $re->embeddedWidgetCreationResult->javascript;
$docKey = $r->embeddedWidgetCreationResult->documentKey;
$re1 = $s->personalizeEmbeddedWidget(array(
'apiKey'=>$ApiKey,
'widgetJavascript' => $widgetScript,
'personalizationInfo' => array(
'email' => 2nd_email_address,
)
)); }