GetUpdatedPackagesWithinDateRange Error message
Thursday, February 7, 2019 at 04:31amI have this code as was suggested by OneSpan for retrieving "GetUpdatedPackagesWithinDateRange" but I am getting an error on this line.
Page completed_packages = eslClient.PackageService.GetUpdatedPackagesWithinDateRange(DocumentPackageStatus.SENT, new PageRequest(index, 10), DateTime.Now.AddDays(-10), DateTime.Now);
using System;
using System.Threading;
using Silanis.ESL.SDK;
using System.Diagnostics;
using System.IO;
namespace GetDocumentsFromELive
{
class LoadFiles
{
private static String apiUrl = "https://sandbox.esignlive.com";
private static string apiKey = "api_keys";
public static void Main(string[] args)
{
EslClient eslClient = new EslClient(apiKey, apiUrl);
int index = 1;
Page completed_packages = eslClient.PackageService.GetUpdatedPackagesWithinDateRange(DocumentPackageStatus.SENT, new PageRequest(index, 10), DateTime.Now.AddDays(-10), DateTime.Now);
while (index Above is the error I was getting on my work computer Network. When I ran the same code on my private laptop, I got different error messages like the one below:
--------------------------------------------------------------
Silanis.ESL.SDK.EslServerException occurred
HResult=0x80131500
Message=Could not get package list. Exception: The remote server returned an error: (401) Unauthorized. HTTP GET on URI https://sandbox.esignlive.com/packages?query=SENT&from=1&to=10&lastUpdatedStartDate=2019-01-28T14:46:01Z&lastUpdatedEndDate=2019-02-07T14:46:01Z. Optional details: {"messageKey":"error.unauthorised.accountSuspended","code":401,"name":"Unauthorized","message":"Cannot create session with suspended account."}
Source=Silanis.ESL
StackTrace:
at Silanis.ESL.SDK.Services.PackageService.GetUpdatedPackagesWithinDateRange(DocumentPackageStatus status, PageRequest request, DateTime from, DateTime to)
at GetDocumentsFromELive.Program.Main(String[] args) in C:\dev\ECM\GetDocumentsFromELive\GetDocumentsFromELive\LoadFiles.cs:line 27
Inner Exception 1:
EslServerException: The remote server returned an error: (401) Unauthorized. HTTP GET on URI https://sandbox.esignlive.com/packages?query=SENT&from=1&to=10&lastUpdatedStartDate=2019-01-28T14:46:01Z&lastUpdatedEndDate=2019-02-07T14:46:01Z. Optional details: {"messageKey":"error.unauthorised.accountSuspended","code":401,"name":"Unauthorized","message":"Cannot create session with suspended account."}
Inner Exception 2:
WebException: The remote server returned an error: (401) Unauthorized.
-------------------------------------
Please any contribution will be helpful.
Thanks!
Nick
Reply to: GetUpdatedPackagesWithinDateRange Error message
Thursday, February 7, 2019 at 05:59am- Michael
Director, Partner and Developer Technologies, OneSpan
Facebook - Twitter - LinkedIn
Reply to: GetUpdatedPackagesWithinDateRange Error message
Thursday, February 7, 2019 at 06:52amReply to: GetUpdatedPackagesWithinDateRange Error message
Thursday, February 7, 2019 at 06:59am- Michael
Director, Partner and Developer Technologies, OneSpan
Facebook - Twitter - LinkedIn
Reply to: GetUpdatedPackagesWithinDateRange Error message
Thursday, February 7, 2019 at 07:02am- Michael
Director, Partner and Developer Technologies, OneSpan
Facebook - Twitter - LinkedIn