-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_signer-internal.php
More file actions
34 lines (29 loc) · 936 Bytes
/
add_signer-internal.php
File metadata and controls
34 lines (29 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
require_once __DIR__ . '/config/config.php';
require_once __DIR__ . '/config/lib.php';
//Token of the Signing that will be shared.
$signingToken = $argv[1];
// Add as many signers as you need.
$signers = [
[
// Unique signer identifier from your system.
'external_id' => '13579',
// Role can be signer or viewer.
'role' => 'signer',
// Optional parameters.
'language' => 'en'
]
];
$action = 'signing-internal/' . $signingToken . '/signers/add';
$createResponse = request(getApiUrlByAction($action), [
'signers' => $signers
], REQUEST_POST);
if ($createResponse['status'] != 'ok') {
print_r($createResponse);
echo "Signing could not be shared." . PHP_EOL;
exit;
}
print_r($createResponse);
//Output URL to check signing status.
print("Signing status can be checked here \n");
print(getApiUrlByAction('signing-external/' . $signingToken . '/status')) . PHP_EOL;