我一直在使用Python EbaySDK来查询ebay的项目等;但是,当我尝试使用以下代码生产Merchandising API时,我遇到了问题:
import ebaysdk
from ebaysdk.merchandising import Connection as Merchandising
from ebaysdk.exception import ConnectionError
try:
api = Merchandising(domain='svcs.ebay.com',config_file=None, appid="APP_ID")
response = api.execute('getMostWatchedItems', {'maxResults': 10})
print(response.dict())
print(response.reply)
except ConnectionError as e:
print(e)
print(e.response.dict())
APP_ID替换为开发者帐户的生产app_id。但是,这会返回以下错误:
u'getMostWatchedItems: Domain: Marketplace, Severity: Error, errorId: 9, Invalid CONSUMER-ID specified'
{'errorMessage': {'error': {'category': 'Application', 'domain': 'Marketplace', 'severity': 'Error', 'message': 'Invalid CONSUMER-ID specified', 'subdomain': 'MarketplaceCommon', 'errorId': '9'}}}
我查看了文档,可以看到使用者ID确实是我传递的应用程序。我已尝试通过创建第二个帐户来交换密钥,但错误仍然存在。对此的任何帮助都是最受欢迎的!