GetMyFeesEstimate API 亚马逊 vba

GetMyFeesEstimate API Amazon vba

我无法从亚马逊获得合理的答复。问题仅在于 GetMyFeesEstimateGetMyPriceForASIN 等其他内容有效。我正在尝试通过 VBA/Excel.

获得回复

来自亚马逊的示例代码:

https://mws.amazonservices.de/Products/2011-10-01?
FeesEstimateRequestList.FeesEstimateRequest.1.MarketplaceId=A1PA6795UKMFR9
&FeesEstimateRequestList.FeesEstimateRequest.1.IdType=ASIN
&FeesEstimateRequestList.FeesEstimateRequest.1.IdValue=3828934897
&FeesEstimateRequestList.FeesEstimateRequest.1.IsAmazonFulfilled=true
&FeesEstimateRequestList.FeesEstimateRequest.1.Identifier=request1
&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.CurrencyCode=EUR
&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.Amount=30.00
&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Shipping.CurrencyCode=EUR
&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Shipping.Amount=3.99
&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Points.PointsNumber=0
&AWSAccessKeyId=XXXXXXXXXXXXX
&Action=GetMyFeesEstimate
&SellerId=XXXXXXXXXXXXXX
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2018-01-07T10%3A26%3A27Z&Version=2011-10-01&Signature=bJJJorhyeKwejuddJs6Z%2BVYZZmKtm0CG2GAXTrShyZM%3D

如果我尝试将此签名请求与我的数据一起使用,则会出现以下错误:

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.

有人可以帮我解决这个问题吗?

Here 是亚马逊的文档。

您没有显示有关如何签署请求的代码。

既然你已经成功了一个API,你能检查一下你在签名字符串和POST请求中使用的十进制值是否完全相同吗? 有时 excel 将 30.0 之类的值存储为 0.3E02 或类似的东西,这会导致签名字符串与您的 post 请求不同。

我使用 Amazon Scratchpad 创建了一个 POST 并获得了有关签名字符串的指导。 请前往 https://mws.amazonservices.com/scratchpad/index.html 在左侧输入详细信息并单击提交后,您可以看到请求详细信息和签名字符串。如果您完全按照那里指定的方式创建请求并完全按照那里指定的方式签名,那么您应该不会遇到歌唱问题。

这是您请求的示例:

POST /Products/2011-10-01?AWSAccessKeyId=

&Action=GetMyFeesEstimate

&SellerId=XXXXXXXXXXXXXX

&SignatureVersion=2

&时间戳=2018-06-12T04%3A19%3A55Z

&版本=2011-10-01

&签名=vJLewLVH7FmUD8cpST8dD51GBUJkt6Aj9FADGLoCjNQ%3D

&SignatureMethod=HmacSHA256

&FeesEstimateRequestList.FeesEstimateRequest.1.MarketplaceId=A1PA6795UKMFR9

&FeesEstimateRequestList.FeesEstimateRequest.1.IdType=ASIN

&FeesEstimateRequestList.FeesEstimateRequest.1.IdValue=3828934897

&FeesEstimateRequestList.FeesEstimateRequest.1.IsAmazonFulfilled=真

&FeesEstimateRequestList.FeesEstimateRequest.1.Identifier=request1

&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.Amount=30.00

&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.CurrencyCode=欧元

&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Shipping.Amount=3.99

&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Shipping.CurrencyCode=欧元

&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Points.PointsNumber=0 HTTP/1.1

主持人:mws.amazonservices.com

x-amazon-user-agent: AmazonJavascriptScratchpad/1.0 (语言=Javascript)

内容类型:text/xml

这是要签名的字符串。 请注意,您必须将 CHR(10) 换行。不要将 VBCRLF 放在字符串中。

POST mws.amazonservices.com /Products/2011-10-01 AWSAccessKeyId=&Action=GetMyFeesEstimate&FeesEstimateRequestList.FeesEstimateRequest.1.IdType=ASIN&FeesEstimateRequestList.FeesEstimateRequest.1.IdValue=3828934897&FeesEstimateRequestList.FeesEstimateRequest.1.Identifier=request1&FeesEstimateRequestList.FeesEstimateRequest。 1.IsAmazonFulfilled=true&FeesEstimateRequestList.FeesEstimateRequest.1.MarketplaceId=A1PA6795UKMFR9&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.Amount=30.00&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.CurrencyCode=EUR&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Points.PointsNumber=0&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Shipping.Amount=3.99&FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Shipping.CurrencyCode=EUR&SellerId=XXXXXXXXXXXXXX&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2018-06-12T04% 3A19%3A55Z&版本=2011-10-01