hi using github code link amazon mws api fetch current listed order. github python-amazon-aws.
code is:
import mws auth = mws.orders(access_key='akiajhsxmwdwdl4xjt7nvlaq', secret_key='xby5yta4wwcqmd9dmjdoa0t3irsl67vsydrfz+y4wgr', account_id='a3azit4dfslu02m7', region='in', domain='', uri="", version="", auth_token="") auth.list_orders(marketplaceids='a21tjruun4kgv', created_after='2015-06-01', created_before=none, lastupdatedafter=none, lastupdatedbefore=none, orderstatus=(), fulfillment_channels=(), payment_methods=(), buyer_email=none, seller_orderid=none, max_results='100')
access key, secret key , account id changed security. first 2 line of code works fine. on adding 3rd line getting error:
$python orders.py traceback (most recent call last): file "orders.py", line 5, in <module> auth.list_orders(marketplaceids='a21tjruun4kgv', created_after='2015-06-01', created_before=none, lastupdatedafter=none, lastupdatedbefore=none, orderstatus=(), fulfillment_channels=(), payment_methods=(), buyer_email=none, seller_orderid=none, max_results='100') file "/usr/local/lib/python2.7/dist-packages/python_amazon_mws-0.6-py2.7.egg/mws/mws.py", line 421, in list_orders return self.make_request(data) file "/usr/local/lib/python2.7/dist-packages/python_amazon_mws-0.6-py2.7.egg/mws/mws.py", line 210, in make_request raise error mws.mws.mwserror: 400 client error: bad request
i not python thing can think of there space @ end of secret_key, not sure if aws python requires iso date format.
try using scratch pad , check if same results.
and if details you've shown in question real aws credentials please change them xxxxxxxxxx
Comments
Post a Comment