Var hash = CryptoJS. Var post = "POST\\n/\nAWSAccessKeyId=YOURACCESSKEY&Action=GetReportRequestCount&MWSAuthToken=6afcd81-0714-a5fa-223e-656b6e2e4a1e&Merchant=YOURMERCHANTID&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=" + encodeURIComponent(timestamp) + "&Version=" You can test your access to MWS using Amazon MWS Scratchpad (docs). Var timestamp = new Date().toISOString() Be sure to replace keys/secret with your own. To save you from typing, here's the code. Required Parameters for ListOrders Request. Here are some recourses I used to comple this If you have any knowledge on any part or this process please help. I do feel like this is very close, but I might be missing a step or I might have some syntax error. I entered in both PostMan and PowerBI and it does not work. HTTPS:///Orders/?AWSAccessKeyId=XXXXXXXXXXXXXXXXXX&Action=ListOrders. I took the hash obtained in python, and added this to the code as the signature as "&Signature=hash" and edited the first part of the link to fit the recommendations form WMS online docs. so I made sure to stay withing the timeframe in my signature.Ĥ. There is a 15min time allowance between your timestamp and the time you send the request. So I removed the spaces, and added a ? between the version date and the AWSAccessKeyID*** It came back with errors on the spaces for the new lines. I formated it this way because the way MWS had the string to sign with the spaces and in the new lines did not code correctly in Python. ***Maybe it's the way I formated the string to sign. onca/xml/Orders/?AWSAccessKeyId=XXXXXXXXXXXXXXXXXXXXX&Action=ListOrders&CreatedAfter=T05%3A00%3A00Z&MarketplaceId.Id.1=ATVPDKIKX0DER&MarketplaceId.Id.2=A2EUQ1WTGCTBG2&SellerId=XXXXXXXXXXXXX&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=T15%3A19%3A40Z&Version=', 'utf-8') I then took the string to sign and using Python3.6, I created a hash with the following code I went on MWS Scratchpad, filled out all information to get an OrderList returned.ĪWSAccessKeyId=XXXXXXXXXXXXXXXXXXXXX&Action=ListOrders&CreatedAfter=T05%3A00%3A00Z&MarketplaceId.Id.1=ATVPDKIKX0DER&MarketplaceId.Id.2=A2EUQ1WTGCTBG2&SellerId=XXXXXXXXXXXXX&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=T15%3A19%3A40Z&Version=ģ. I downloaded PostMan, and created a request.Ģ. I wanted to check if it is possible to connect to MWS I've tried to dissect it and complete the steps as described on MWS and Python, but maybe I've been looking at it for too long.ġ. Please look at them and see if you can spot an error on my part. But even after obtaining the signature I am not able to bring the data in. I found a code that encrypts to SHA256 using Python like is required for the signature. Maybe we can complete our own research and work on this together. I am a BI Developer and I have worked with PowerBI, Tableau, Cognos, SSMS, SSIS, and SSRS. I have spent days trying to figure out how to get my data over to PowerBI or even SSMS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |