Disabled User Clear Saved Signatures
Friday, April 11, 2025 at 10:59amSince OneSpan applies saved signatures (from File and Drawn) for someone who is disabled as a sender but still signs documents we want to be able to clear those values so they aren't appied when someone is disabled.
Can I
- Going throught a list of users see when one is disabled
- Clear any saved image (from file)
- Clear a drawn image
Is this possible with the .NET API or even REST?
Reply to: Disabled User Clear Saved Signatures
Friday, April 11, 2025 at 01:17pmI was able to determine if the user was active and remove the saved image using the code below. How do I remove the hand drawn signature from them also?
Sender theSender = oClient.AccountService.GetSender(senderId);
Console.WriteLine("Sender Status=" + theSender.Status);
if (theSender.Status != SenderStatus.ACTIVE)
Console.Write("Sender is NOT Active");
oClient.AccountService.DeleteSenderImageSignature(senderId); //removed saved image
Reply to: Disabled User Clear Saved Signatures
Wednesday, April 16, 2025 at 08:20amGive this endpoint a try: https://community.onespan.com/products/onespan-sign/sandbox#/Senders/api.account.senders._senderId.signature.image.delete
Reply to: Disabled User Clear Saved Signatures
Wednesday, April 16, 2025 at 12:37pmHttpClient client = new HttpClient();
client.BaseAddress = new Uri(GlobalSettings.eSignCurrentURL); //account used to connect State of Michigan or Subaccount key
// Add an Accept header for JSON format.
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
//var byteArray = System.Text.Encoding.ASCII.GetBytes(userID + ":" + Pwd); //SOM\userid
//client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", GlobalSettings.eSignCurrentAPIKey);
// List data response.
string theDeleteURL = GlobalSettings.eSignCurrentURL + "/account/senders/" + senderID.ToString() + "/signature/image";
HttpResponseMessage response = client.DeleteAsync(theDeleteURL).Result; // Blocking call! Program will wait here until a response is received or a timeout occurs.
// result = new JObject();
//result = JObject.Parse(await response.Content.ReadAsStringAsync());
string result = await response.Content.ReadAsStringAsync();
client.Dispose();
Console.WriteLine(response.ToString());
Console.WriteLine("-----------------------------------------------------------------");
Console.WriteLine(result.ToString());
the code works BUT it only removed the saved image, NOT the hand drawn signature. I need to remove the signature because of how OneSpan applies saved files (signatures) and hand drawn signatures for users who are disabled and we don't want it too so the best way is to remove those items.
Reply to: Disabled User Clear Saved Signatures
Wednesday, April 23, 2025 at 01:52pmTo delete the handdrawn signature, you'll first need to do a GET on the sender details: https://community.onespan.com/products/onespan-sign/sandbox#/Senders/api.account.senders._senderId.get. Then modify the handdrawn field to null and update the sender details using the following API: https://community.onespan.com/products/onespan-sign/sandbox#/Senders/api.account.senders._senderId.post.
You'll need to logout of your OneSpan Sign account in order to see the change.
Reply to: Disabled User Clear Saved Signatures
Friday, May 2, 2025 at 06:39amI can't seem to get my code correct. Where is the code library with examples that used to exist? I want to look at this example and see what I'm missing.
Thank you