Using a CustomId with a Group signer causes an error
Tuesday, October 11, 2016 at 12:47pmReposting from the .Net SDK channel
Issue:
It seems the issue is because eSignLive is anticipating that the ‘Id’ of the group is the GUID that identifies the group in eSignLive, and so if the ‘Id’ is changed to something else it can’t find the role of the group.
Unhandled Exception: Silanis.ESL.SDK.EslServerException: Could not upload document to package. Exception: The remote server returned an error: (400) Bad Request. HTTP POST on URI https://sandbox.e-signlive.com/api/packages/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/documents. Optional details: {“technicalâ€:â€No role set in approval.â€,â€messageKeyâ€:â€error.validation.validateApproval.noRolesOnApprovalâ€,â€packageIdâ€:null,â€entityâ€:null,â€codeâ€:400,â€messageâ€:â€No role specified as part of this approval.â€,â€nameâ€:â€Validation Errorâ€} —> Silanis.ESL.SDK.EslServerException: The remote server returned an error: (400) Bad Request. HTTP POST on URI https://sandbox.e-signlive.com/api/packages/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/documents. Optional details: {“technicalâ€:â€No role set in approval.â€,â€messageKeyâ€:â€error.validation.validateApproval.noRolesOnApprovalâ€,â€packageIdâ€:null,â€entityâ€:null,â€codeâ€:400,â€messageâ€:â€No role specified as part of this approval.â€,â€nameâ€:â€Validation Errorâ€} —> System.Net.WebException: The remote server returned an error: (400) Bad Request.I took the Simple Create and Send Package sample and modified it to use a group. Here is the modified version which produces the error:
namespace ESignLiveGroupIdIssue { using System; using System.IO; using Silanis.ESL.SDK; using Silanis.ESL.SDK.Builder; class Program { private static String apiUrl = "https://sandbox.e-signlive.com/api"; // USE https://apps.e-signlive.com/api FOR PRODUCTION private static String apiKey = "YOUR API KEY"; private static GroupId groupId = new GroupId("AN EXISTING GROUP ID"); static void Main(string[] args) { EslClient eslClient = new EslClient(apiKey, apiUrl); FileStream fs = File.OpenRead("Test.pdf"); DocumentPackage superDuperPackage = PackageBuilder .NewPackageNamed("Test Package .NET") .WithSettings(DocumentPackageSettingsBuilder .NewDocumentPackageSettings()) .WithSigner(SignerBuilder .NewSignerWithEmail("[email protected]") .WithFirstName("Signer First Name") .WithLastName("Signer Last Name") .WithCustomId("Signer")) .WithSigner(SignerBuilder .NewSignerFromGroup(groupId) .WithCustomId("Group")) .WithDocument(DocumentBuilder.NewDocumentNamed("sampleAgreement") .FromStream(fs, DocumentType.PDF) .WithSignature(SignatureBuilder .SignatureFor("[email protected]") .OnPage(0) .AtPosition(175, 165)) .WithSignature(SignatureBuilder .SignatureFor(groupId) .OnPage(0) .AtPosition(550, 165)) ) .Build(); PackageId packageId = eslClient.CreatePackage(superDuperPackage); eslClient.SendPackage(packageId); } } }Expectation: It would be nice if either setting a ‘Id’ for a group was not allowed or eSignLive is changed to be able to use a custom ‘Id’ with a group.
Reply to: Using a CustomId with a Group signer causes an error
Tuesday, October 11, 2016 at 11:22amReply to: Using a CustomId with a Group signer causes an error
Tuesday, October 11, 2016 at 12:42pm