Amazon Product API Issues: The request has not been correctly signed.

0

I posted about this in the past and never got any help, and even reached out to amazon directly and got no replies. Now, with recent changes to Amazon's Sitestripe, I need to use the API now more than ever, and I don't understand why it is so difficult to do so.

I am trying to get started with the Amazon Product API, and have set up some of their sample java files in VS Code. I inputted my access key and secret key and one of my amazon affiliate store IDs, and I continue to get this error:

API called successfully Complete response: class GetItemsResponse { errors: [class ErrorData { code: InvalidSignature message: The request has not been correctly signed. If you are using an AWS SDK, requests are signed for you automatically; otherwise, go to https://webservices.amazon.com/paapi5/documentation/sending-request.html#signing.

When I try through ScratchPad, it says "HTTP Status: 401: Unauthorized | Response Time: 102 ms | Request ID: d5dbe112-8df9-4533-854a-67f4e47525dc"

I have deleted and remade my keys multiple times and nothing changes. Can I get some assistance with this please?

已提問 6 個月前檢視次數 569 次
1 個回答
0

Hi,

Some of AWS API endpoints are Global, and some are region-specific. Not sure about your specific case, but give it a try and either use the same region to create signature or use version 4A. More details you can find here: https://docs.aws.amazon.com/IAM/latest/UserGuide/create-signed-request.html#

profile picture
專家
已回答 6 個月前
  • I can try changing the region, but I don't see any region on the amazon affiliates page where I create the credentials. So I don't know what region to enter in the sample code, which said "us-east-1" initially (I'm from US West, and changing that gave me the same error about the signature). I looked at the link you shared but this is even more complicated and confusing, so I will have to spend some time on it. Is this the process every amazon affiliate needs to go through to use the API?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南