C# eBayAPIInterfaceClient 错误 : The web service eBayAPI is not properly configured or not found and is disabled

标签 c# ebay-api

我正在尝试使用 C# 与 ebay API 进行交互。他们提供的用于获取时间的 C# 示例代码工作正常。这似乎是在 VS 中使用“网络引用”(我使用的是 2008 Express)。

当我尝试向我的项目添加“服务引用”时,我必须按以下方式使用 eBayAPIInterfaceClient(我找不到对任何 ebayAPIInterfaceService< 的引用 就像他们的示例使用的那样):

eBayAPIInterfaceClient client = new eBayAPIInterfaceClient();

CustomSecurityHeaderType credentials = new CustomSecurityHeaderType();

credentials.Credentials = new UserIdPasswordType();

credentials.Credentials.AppId = AppSettings.EbayAppID;
credentials.Credentials.DevId = AppSettings.EbayDevID;
credentials.Credentials.AuthCert = AppSettings.EbayCertID;
credentials.eBayAuthToken = AppSettings.EbayToken;

GeteBayOfficialTimeRequestType ebayTimeReq = new GeteBayOfficialTimeRequestType();

ebayTimeReq.Version = "551";

GeteBayOfficialTimeResponseType response = client.GeteBayOfficialTime( ref credentials, ebayTimeReq );

无论如何,它不起作用(显然我使用的是相同的设置,例如 AppID、 token 等)。它给了我返回:

com.ebay.app.pres.service.hosting.WebServiceDisabledException: The web service eBayAPI is not properly configured or not found and is disabled.

有什么想法吗?我的意思是我假设我在这里没有做任何真正愚蠢的事情:)

最佳答案

您似乎忘记设置 url。您需要为网络服务指明适当的 URL,以表明您是尝试使用实时环境还是沙箱。

参见 https://ebay.custhelp.com/app/answers/detail/a_id/861/~/error---webservicedisabledexception

试试这个(直播):

eBayAPIInterfaceClient client = new eBayAPIInterfaceClient();
client.Url = "https://api.ebay.com/wsapi";

// etc...

关于C# eBayAPIInterfaceClient 错误 : The web service eBayAPI is not properly configured or not found and is disabled,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6050369/

相关文章:

c# - 如何用OpenCV进行图像光照校正?

C#.Net 4.5 属性网格 : how to hide Properties

python - 获取易趣 OAuth token

c# - 如何使用 Servicestack swagger-api 记录 ServiceStack 中的服务响应 (1.2)

C#:如何在计时期间停止计时器

javascript - 如何从 eBay 通知中获取数据

xml - eBay API 将 XML 解析为 Google 脚本时出现问题

java - GetOrders API 调用在 Ebay 沙盒帐户上未返回任何订单

C# P/Invoke Win32 函数 RegQueryInfoKey

javascript - Ebay 交易 API 获取商品 Ajax 请求