Obtain a copy of the current documents specified by the template_id
parameter. Returns a PDF or ZIP file.
If the files are currently being prepared, a status code of 409
will be returned instead. In this case please wait for the template_created
callback event.
successful operation
failed_operation
<?php
require_once __DIR__ . "/vendor/autoload.php";
$config = Dropbox\Sign\Configuration::getDefaultConfiguration();
// Configure HTTP basic authorization: api_key
$config->setUsername("YOUR_API_KEY");
// or, configure Bearer (JWT) authorization: oauth2
// $config->setAccessToken("YOUR_ACCESS_TOKEN");
$templateApi = new Dropbox\Sign\Api\TemplateApi($config);
$templateId = "5de8179668f2033afac48da1868d0093bf133266";
$fileType = "pdf";
try {
$result = $templateApi->templateFiles($templateId, $fileType);
copy($result->getRealPath(), __DIR__ . '/file_response.pdf');
} catch (Dropbox\Sign\ApiException $e) {
$error = $e->getResponseObject();
echo "Exception when calling Dropbox Sign API: "
. print_r($error->getError());
}
{- "error": {
- "error_msg": "This value should not be blank",
- "error_path": "cc_email_addresses[0]",
- "error_name": "bad_request"
}
}