eBay API在沙盒中返回“应用程序ID无效”,但在生产环境中有效

2024-09-29 00:12:57 发布

您现在位置:Python中文网/ 问答频道 /正文

例如,我有以下网址:

http://open.api.sandbox.ebay.com/shopping?MaxEntries=2&QueryKeywords=pen&AvailableItemsOnly=false&version=681&siteid=0&appid=appid&callname=FindProducts&responseencoding=XML

以及

http://open.api.ebay.com/shopping?callname=FindProducts&responseencoding=XML&appid=appid&siteid=0&version=681&QueryKeywords=pen&AvailableItemsOnly=true&MaxEntries=2

第一个错误产生以下错误:

2012-09-19T11:32:33.794Z Failure Application ID invalid. Application ID invalid. 1.20 Error RequestError E791_CORE_BUNDLED_15340089_R1 791

而第二个没有。我已经检查了很多次,并且appid在两个url中都是相同的,所以问题不在于appid。在

我的python代码形成的第一个url:

import requests
d=dict(appid = app_id, siteid = site_id, version = version)

d.update(user_params)
data = requests.get(endpoint, params=d)

问题的根源是什么?为什么两个看似相似的网址行为不同?在


Tags: comapihttpversionopenappid网址shopping
1条回答
网友
1楼 · 发布于 2024-09-29 00:12:57

http://open.api.sandbox.ebay.com/shopping?&;http://open.api.ebay.com/shopping?

一个是沙盒,一个是生产

When you join the Developers Program, you are provided with key sets for your application. The keys set for the Sandbox is different from the key set for the Production environment. (Keys for the Sandbox cannot be used to make API calls in the Production environment. Conversely, Production keys cannot be used to make API calls in the Sandbox.)

因此,您的问题是两个URL中的appID是相同的 来自Sandbox and Production Keys

相关问题 更多 >