Creating the template or package give error
Monday, April 18, 2016 at 02:32pmI took the sample code .net code (c#) from online and was getting the below error when creating a template and package.
"Could not create template. Exception: Error communicating with esl server. Invalid URI: The format of the URI could not be determined."
Reply to: Creating the template or package give error
Tuesday, April 19, 2016 at 03:56amReply to: Creating the template or package give error
Tuesday, April 19, 2016 at 06:45amReply to: Creating the template or package give error
Tuesday, April 19, 2016 at 07:32amCan you try changing the base url to "https://sandbox.e-signlive.com/api" (notice the dash in e-signlive) and see if it works? I think it might be the culprit here. Regarding your requirements:
Reply to: Creating the template or package give error
Tuesday, April 19, 2016 at 08:52amReply to: Creating the template or package give error
Tuesday, April 19, 2016 at 09:49am- can you make sure you are registered on US sandbox? In other words, when you log into your sandbox account, are you on .com or .ca? And change the base url accordingly if you are on canadian sandbox.
- page index starts at 0. So if you only have a single page on your document, it will throw an error if you do .OnPage(1).
You can definitely create your template from the web ui and then create your package programmatically. To do this you will you need to grab the id of your template which you can find in the url when you browse to your template in the web ui (e.g. https://sandbox.e-signlive.com/packages/{templateId}).PackageId templateId = new PackageId("{templateId}"); DocumentPackage newPackage = PackageBuilder.NewPackageNamed(PackageName) .DescribedAs(PACKAGE_DESCRIPTION) .WithEmailMessage(PACKAGE_EMAIL_MESSAGE) .WithSigner(SignerBuilder.NewSignerWithEmail(email2) .WithFirstName(PACKAGE_SIGNER_FIRST) .WithLastName(PACKAGE_SIGNER_LAST).Replacing(new Placeholder(PLACEHOLDER_ID))) .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings().WithInPerson()) .Build(); PackageId packageId = eslClient.CreatePackageFromTemplate(templateId, newPackage);Reply to: Creating the template or package give error
Tuesday, April 19, 2016 at 09:58amReply to: Creating the template or package give error
Tuesday, April 19, 2016 at 11:31amReply to: Creating the template or package give error
Tuesday, April 19, 2016 at 11:36amReply to: Creating the template or package give error
Tuesday, April 19, 2016 at 11:56amReply to: Creating the template or package give error
Tuesday, April 19, 2016 at 12:23pmReply to: Creating the template or package give error
Wednesday, April 20, 2016 at 04:35amusing System; using System.IO; using Silanis.ESL.SDK; using Silanis.ESL.SDK.Builder; namespace createTemplateFrom { class createTemplateFrom { private static String APIUrl = "https://sandbox.e-signlive.com/api"; private static String APIKey = "your_api_key_here"; public static PackageId templateId; public static PackageId packageId; public static string DOCUMENT_NAME = "First Document"; public static string DOCUMENT_ID = "doc1"; public static string TEMPLATE_NAME = "CreatePackageFromTemplateWithReplacingPlaceholderExample Template: " + DateTime.Now; public static string TEMPLATE_DESCRIPTION = "This is a template created using the e-SignLive SDK"; public static string TEMPLATE_EMAIL_MESSAGE = "This message should be delivered to all signers"; public static string TEMPLATE_SIGNER_FIRST = "John"; public static string TEMPLATE_SIGNER_LAST = "Smith"; public static string email1 = "[email protected]"; public static string PACKAGE_DESCRIPTION = "This is a package created using the e-SignLive SDK"; public static string PACKAGE_EMAIL_MESSAGE = "This message should be delivered to all signers"; public static string PACKAGE_SIGNER_FIRST = "Patty"; public static string PACKAGE_SIGNER_LAST = "Galant"; public static string email2 = "[email protected]"; public static string PLACEHOLDER_ID = "PlaceholderId1"; public static void Main(string[] args) { EslClient eslClient = new EslClient(APIKey, APIUrl); Stream fileStream1 = File.OpenRead(@"DOC_FILE_PATH"); //Create template with one signer and one placeholder DocumentPackage template = PackageBuilder.NewPackageNamed(TEMPLATE_NAME) .DescribedAs(TEMPLATE_DESCRIPTION) .WithEmailMessage(TEMPLATE_EMAIL_MESSAGE) .WithSigner(SignerBuilder.NewSignerWithEmail(email1) .WithFirstName(TEMPLATE_SIGNER_FIRST) .WithLastName(TEMPLATE_SIGNER_LAST)) .WithSigner(SignerBuilder.NewSignerPlaceholder(new Placeholder(PLACEHOLDER_ID))) .WithDocument(DocumentBuilder.NewDocumentNamed(DOCUMENT_NAME) .WithId(DOCUMENT_ID) .FromStream(fileStream1, DocumentType.PDF) .WithSignature(SignatureBuilder.SignatureFor(email1) .OnPage(0) .AtPosition(100, 100)) .WithSignature(SignatureBuilder.SignatureFor(new Placeholder(PLACEHOLDER_ID)) .OnPage(0) .AtPosition(400, 100))) .Build(); templateId = eslClient.CreateTemplate(template); //Create package from template and replacing placeholder with signer DocumentPackage newPackage = PackageBuilder.NewPackageNamed("Test") .DescribedAs(PACKAGE_DESCRIPTION) .WithEmailMessage(PACKAGE_EMAIL_MESSAGE) .WithSigner(SignerBuilder.NewSignerWithEmail(email2) .WithFirstName(PACKAGE_SIGNER_FIRST) .WithLastName(PACKAGE_SIGNER_LAST).Replacing(new Placeholder(PLACEHOLDER_ID))) .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings().WithInPerson()) .Build(); packageId = eslClient.CreatePackageFromTemplate(templateId, newPackage); } } }Templates are useful if you're planning on sending the same document over and over again and only replacing your placeholder(s) with your signers. If you plan on uploading a different document every time, then there is really no need to create a template. You can just create a new package and send it for signing. Let me know if anything is unclear :)Reply to: Creating the template or package give error
Wednesday, August 3, 2016 at 07:29amReply to: Creating the template or package give error
Wednesday, August 3, 2016 at 07:43amReply to: Creating the template or package give error
Friday, August 5, 2016 at 05:47amReply to: Creating the template or package give error
Sunday, July 29, 2018 at 05:20amReply to: Creating the template or package give error
Monday, July 30, 2018 at 04:47amReply to: Creating the template or package give error
Monday, July 30, 2018 at 07:06amWithId(),WithRoleId()andWithCustomId(), the attachment shows you a snippet of code and the corresponding JSON it represents (It may not necessary to be one to one mapping but it gives you the idea). In the attachment, you will see once you set with theWithCustomId(), the Role ID and Signer ID would be set to be the same and since you are using Template Feature, OneSpan Sign already know your document approvals and which signature approval you want to bind with the Role ID, that's why you would also see this Role ID under the "Approval" block in the JSON. Last two functions are straightforward,WithId()assigns the document ID andWithRoleId()only assigns the Role ID. Hope this could help you! Duo