This topic contains 2 replies, has 3 voices, and was last updated by  Heijiro_Corral 2 months, 1 week ago.

  • Author
    Posts
  • Participant
    Masi
    Newbie
    Member since: 21.05.2018
    Number of posts: 5

    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.

    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    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
    Participant
    Heijiro_Corral
    Newbie
    Member since: 13.11.2018
    Number of posts: 1

    Score

    0

    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”: “heijiro.corral@paccar.com”
    }
    ],
    “name”: “purchaser”
    },
    {
    “id”: “dealer”,
    “type”: “SIGNER”,
    “index”: 2,
    “signers”: [
    {
    “firstName”: “Manjunath”,
    “lastName”: “Malige”,
    “email”: “manjunath.malige@paccar.com”
    }
    ],
    “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”
    }

You must be logged in to reply to this topic.