Account


Earned badges

Achievement: Latest Unlocked

Topic Started

This user has not created any forum posts.

Replies Created

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" }

Subscriptions

Topics Replies Freshness Views Users
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-si
2 5 years 6 months ago 99
Profile picture for user harishaidary

Code Share

This user has not submitted any code shares.

Subscriptions Release Notes

This user is not subscribed to any release notes.