Hi, currently I am just start working on the API, but get stuck at the first step.
The URL I generated seems not correct.
The param I am using to generate signature is:
POST
mws.amazonservices.com
/FulfillmentInventory/2010-10-01
AWSAccessKeyId=AKIxxxxxxxxxxUA&Action=ListInventorySupply&QueryStartDateTime=2016-07-30T00%3A06%3A07.000Z&SellerId=A1ZxxxxxxxxxD&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2018-07-05T05%3A47%3A10.831Z&Version=2011-03-01
just like the example.
I use this string to generate the signature and append the urlencoded signature to the end of params
so the post body is
AWSAccessKeyId=AKIxxxxxxxxxxUA
Action=ListInventorySupply
QueryStartDateTime=2016-07-30T00%3A06%3A07.000Z
SellerId=A1ZxxxxxxxxxD
SignatureMethod=HmacSHA256
SignatureVersion=2
Timestamp=2018-07-05T05%3A47%3A10.831Z
Version=2011-03-01
Signature:YWNmxxxxxxwZDMxMzZhOGRhNzNhNjk4YTg3NmUzNA%3D%3D
I post it to the url “https://mws.amazonservices.com/FulfillmentInventory/2010-10-01”
the response is “Timestamp 2018-07-05T05%3A47%3A10.831Z must be in ISO8601 format”
when I replace the “%3A” to “:”, it response:“The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.”
The document said all the params must urlencoded, I did but it is wrong.
I also tried to change the params just like example:
AWSAccessKeyId=AKIxxxxxxxxxxUA
&Action=ListInventorySupply
&QueryStartDateTime=2016-07-30T00%3A06%3A07.000Z
&SellerId=A1ZxxxxxxxxxD
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2018-07-05T05%3A47%3A10.831Z
&Version=2011-03-01
&Signature=YWNmxxxxxxwZDMxMzZhOGRhNzNhNjk4YTg3NmUzNA%3D%3D
It response: “Either Action or Operation query parameter must be present”
and I found this post has the same problem as me, at the end the author seems successful post something to API but I failed when I follow the path.
Could anyone paste an detailed example how they compose the string and generate the signature and the final post body, head, url?
Thank you.
The best way to troubleshoot this is to use scratchpad. Make the same request and then look at the “Request Details” tab and you should see the difference.