Chris

Using a CustomId with a Group signer causes an error

0 votes
Reposting 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

0 votes
Hi Chris, I can definitely see the value of setting a custom id when creating groups. Unfortunately, it is not currently possible to set a custom signer id to a group signer. You can definitely make your request in the Enhancement Ideas forum. Our product managers regularly check this forum for suggestions coming from customers.
Haris Haidary OneSpan Technical Consultant

Reply to: Using a CustomId with a Group signer causes an error

0 votes
I will post the issue over there. Thanks

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off