baellin | Posts: 2

Problem with GetPackage: Signer Id vs Role Id

0 votes
When I use the .NET SDK version 11.5, I'm have a problems getting the signerId of package signers. What I want to do is this:
  1. call the eslClient.GetPackage(packageId) method to get information about an existing package
  2. get an authorization token, by SignerId, for a signer from the package
Here's the code I'm using:
 var package = eslClient.GetPackage(packageId);
  var signerId = package.Signer[0].Id;    
  var token = eslClient.AuthenticationToken.CreateSignerAuthenticationToken(packageId, signerId); 
And here's the exception I'm getting back:
EslServerException: Could not create a signer authentication token. Exception: The remote server returned an error: (500) Internal Server Error. HTTP POST on URI https://sandbox.esignlive.com/api/authenticationTokens/signer/multiUse. Optional details: {"messageKey":"error.internal.default","technical":"No signer found with uid or email signer1","code":500,"name":"Unhandled Server Error","message":"Unexpected error. We apologize for any inconvenience this may have caused you, please try again. If the problem persists, please contact our support team."}]
My initial analysis is this: It appears the the REST API returns two different ids for each signer: the role.id, and the signer.id. The .NET SDK populates the Signer.Id with the value from the REST API role.id field. However, the CreateSignerAuthenticationToken method is expecting the value from the REST API signer.id field. My questions is this:
  1. is this a bug? should the .NET SDK populate the Signer.Id with the signer.id field instead of the role.id field?
  2. alternatively, can the SDK be modified so the Signer object has both a RoleId and SignerId property, so that calls like CreateSignerAuthenticationToken that expect signerId can be made to work?
  3. alternatively, am I missing something?
Thanks and regards, Brent Ellingson

harishaidary | Posts: 1812

Reply to: Problem with GetPackage: Signer Id vs Role Id

0 votes
Hi Brent, The SDK does in fact return the role id instead of the signer id and it is not a bug. Some other calls require the role id instead of the signer id. There are two ways you can get around this issue: 1. Set custom ids to your signers. When you do this, the SDK assigns this custom id to both the role and signer id. 2. The SDK is also open source. So you can modify it to return the signer id instead. Hope this helps.

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