Masi

Sandbox Web API Is Not Working

1 votes
Hi Team, I am Creating some application to Perform Operation on the Packages and Since Last two Hours The API is not working Below URL i have tried https://sandbox.esignlive.com https://sandbox.e-signlive.ca" "One or more errors occurred.An error occurred while sending the request. The underlying connection was closed: An unexpected error occurred on a send. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. An existing connection was forcibly closed by the remote host ". This Error i am getting it When i tried to connect. Kindly take an action as soon as possible please.

Reply to: Sandbox Web API Is Not Working

0 votes
Hi, I removed your attachment since it contained your API key. From your screenshot, there are a couple things I want to point out: 1. It looks like there is a typo in your request URL (i.e. a space between authentication and Tokens). Can you verify that it isn't the case? 2. The request should be a POST and not a GET as per: https://developer.esignlive.com/guides/feature-guides/authentication-tokens/ 3. Make sure you are using the right environment tied to your API key. In other words, the environment URL should be the same as the one you used to get your API key.
Haris Haidary OneSpan Technical Consultant

Reply to: Sandbox Web API Is Not Working

0 votes
hi Haris i'm using the code of "Creating and Sending a Package" but i'm still getting the error "unable to read data from the transport connection" i just update the code with my data to test it but it does not work what can it be? System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; StreamReader jfile = File.OpenText("C:\\temp\\eSignDemo\\create_anchors_paccar.json"); jsonString = jfile.ReadToEnd().ToString(); StringContent jsonContent = new StringContent(jsonString, Encoding.UTF8, "application/json"); byte[] fileByteArray = File.ReadAllBytes("C:\\temp\\eSignDemo\\Class_8_Warranty.pdf"); ByteArrayContent content = new ByteArrayContent(fileByteArray); content.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data"); content.Headers.ContentDisposition.Name = "\"file\""; content.Headers.ContentDisposition.FileName = "\"Class_8_Warranty.pdf\""; content.Headers.ContentType = new MediaTypeHeaderValue("application/pdf"); MultipartFormDataContent form = new MultipartFormDataContent(); form.Add(content, "\"file\"", "\"Class_8_Warranty.pdf\""); form.Add(jsonContent, "\"payload\""); HttpClient myClient = new HttpClient(); myClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", apiKey); myClient.DefaultRequestHeaders.Add("Accept", "application/json"); var response = myClient.PostAsync(new Uri(apiUrl) + "/packages/", form); Debug.WriteLine(response.Content.ReadAsStringAsync().Result); -------Json ---- { "roles": [ { "id": "purchaser", "type": "SIGNER", "index": 1, "signers": [ { "firstName": "Heijiro", "lastName": "Corral", "email": "[email protected]" } ], "name": "purchaser" }, { "id": "dealer", "type": "SIGNER", "index": 2, "signers": [ { "firstName": "Manjunath", "lastName": "Malige", "email": "[email protected]" } ], "name": "dealer" } ], "documents": [ { "approvals": [ { "fields": [ { "type": "SIGNATURE", "extract": false, "extractAnchor": { "text": "Signature", "index": 0, "width": 150, "height": 30, "anchorPoint": "TOPLEFT", "characterIndex": 0, "leftOffset": -100, "topOffset": -30 }, "left": 0, "subtype": "FULLNAME", "top": 0 } ], "role": "purchaser" }, { "fields": [ { "type": "SIGNATURE", "extract": false, "extractAnchor": { "text": "Authorized Dealer Representative", "index": 0, "width": 150, "height": 30, "anchorPoint": "TOPLEFT", "characterIndex": 0, "leftOffset": -25, "topOffset": -30 }, "left": 0, "subtype": "FULLNAME", "top": 0 } ], "role": "dealer" } ], "name": "Sample Warranty" } ], "name": "PoC for KenMex", "type": "PACKAGE", "language": "es", "emailMessage": "Can you please sign??", "description": "Demo for KenMex", "autoComplete": true, "status": "SENT" }

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