My ApiContext Code is here. What my Code lack.Run result is Error:timeout.
ps:my ApiServerUrl is https://api.ebay.com/wsapi
apiContext =AppSettingHelper.GetApiContext(); //set Api Server Url apiContext.SoapApiServerUrl = ConfigurationManager.AppSettings["Environment.ApiServerUrl"]; //set Api Token to access eBay Api Server ApiCredential apiCredential = new ApiCredential(); apiCredential.eBayToken = ConfigurationManager.AppSettings["UserAccount.ApiToken"]; apiCredential.oAuthToken = ConfigurationManager.AppSettings["OAuth.Application.Token"]; apiContext.ApiCredential = apiCredential; //set eBay Site target to US apiContext.Site = SiteCodeType.US; //set Api logging apiContext.ApiLogManager = new ApiLogManager(); apiContext.ApiLogManager.ApiLoggerList.Add( new FileLogger("listing_log.txt", true, true, true) ); apiContext.ApiLogManager.EnableLogging = true;
GetOrdersCall it here
GetOrdersCall api = new GetOrdersCall(context); api.OrderRole = TradingRoleCodeType.Seller; api.OrderStatus = OrderStatusCodeType.Completed; System.DateTime calTo = System.DateTime.Now; System.DateTime calFrom = new DateTime(calTo.Year, calTo.Month, calTo.Day-1); api.CreateTimeFrom = calFrom; api.CreateTimeTo = calTo; // Make API call. OrderTypeCollection orders = api.GetOrders(calFrom, calTo, api.OrderRole, api.OrderStatus);