简体   繁体   English

如何解决“需要创建卖家帐户”的 eBay API?

[英]How to fix "need to create a seller's account" eBay API?

I've created a eBay sandbox account and a paypal sandbox account.我创建了一个 eBay 沙箱帐户和一个贝宝沙箱帐户。 When I make a request to AddItem I get an error.当我向 AddItem 发出请求时,出现错误。 I've tried:我试过了:

from ebaysdk.trading import Connection

if __name__ == "__main__":
    api = Connection(config_file=r'C:\Users\username\PycharmProjects\ebay\ebaysdk-python\ebay.yaml', domain='api.sandbox.ebay.com', debug=True)
    request = {
        "Item": {
            "Title": "Professional Mechanical Keyboard",
            "Country": "US",
            "Location": "US",
            "Site": "US",
            "ConditionID": "1000",
            "PaymentMethods": "PayPal",
            "PayPalEmailAddress": "nobody@gmail.com",
            "PrimaryCategory": {"CategoryID": "33963"},
            "Description": "A really nice mechanical keyboard!",
            "ListingDuration": "Days_10",
            "StartPrice": "150",
            "Currency": "USD",
            "ReturnPolicy": {
                "ReturnsAcceptedOption": "ReturnsAccepted",
                "RefundOption": "MoneyBack",
                "ReturnsWithinOption": "Days_30",
                #"Description": "If you are not satisfied, return the keyboard.",
                "ShippingCostPaidByOption": "Buyer"
            },
            "ShippingDetails": {
                "ShippingServiceOptions": {
                    "FreeShipping": "True",
                    "ShippingService": "USPSMedia"
                }
            },
            "DispatchTimeMax": "3"
        }
    }
    api.execute("AddItem", request)

error message: ... ebaysdk.exception.ConnectionError: "AddItem: Class: RequestError, Severity: Error, Code: 120, You need to create a seller's account. Before you can list this item we need some additional information to create a seller's account."错误消息:... ebaysdk.exception.ConnectionError: "AddItem: Class: RequestError, Severity: Error, Code: 120, You need to create a Seller’s account. 在你可以列出这个项目之前,我们需要一些额外的信息来创建卖家的帐户。”

Process finished with exit code 1进程以退出代码 1 结束

I gave up using the sandbox long ago, and do all the eBay stuff live.我很久以前就放弃了使用沙箱,而是实时完成所有 eBay 的工作。 The sandbox seems to create more issues than it bypasses.沙箱似乎产生的问题比它绕过的要多。

So the error is "You need to create a seller's account. Before you can list this item we need some additional information to create a seller's account."所以错误是“您需要创建一个卖家帐户。在您发布此商品之前,我们需要一些额外的信息来创建一个卖家帐户。”

Sounds like that is the correct answer.听起来这是正确的答案。 Go into the ebay account linked, list an item for sale, then follow the prompts until it's listed.进入链接的 ebay 帐户,列出待售商品,然后按照提示进行操作,直到列出为止。 (Call it "fake item for testing, do not buy" or similar if doing this live.) Whatever is stopping you from listing through the API should also be stopping you from listing through the GUI, and eBay issues are always easier to fix from the front end. (如果这样做的话,称之为“用于测试的假货,请勿购买”或类似的东西。)阻止您通过 API 发布商品的任何因素也应该阻止您通过 GUI 发布商品,而 eBay 问题总是更容易解决前端。

Once you have successfully listed an item on the front end, try running this code again.在前端成功列出项目后,请再次尝试运行此代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM