-1

So I am using Amazons Product Advertising API and getting SignatureDoesNotMatchThe everywhere I turn.

The problem is not with my code because I have started using this scratchpad < http://associates-amazon.s3.amazonaws.com/scratchpad/index.html >

What gives? I have created a credential in AWS like all others - what else do I need to do or why is this just failing?

The full error is as follows:

    <?xml version="1.0"?>
    <ItemLookupErrorResponse xmlns="http://ecs.amazonaws.com/doc/2011-08-01/"><Error>
<Code>SignatureDoesNotMatch</Code>
<Message>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.</Message>
</Error>
<RequestId>a89715b8-8e81-4d33-ad94-b85c92fb0631</RequestId></ItemLookupErrorResponse>
jim
  • 8,670
  • 15
  • 78
  • 149

1 Answers1

1

I found signing requests to be painful. I finally got it to work by reading the documentation carefully and using the Signed Requests Helper tool.

The documentation https://docs.aws.amazon.com/AWSECommerceService/latest/DG/prod-adv-api-dg.pdf outlines the steps starting on page 55. My problem was getting the url encoding right. Also, as vinayr mentioned, the parameters do have to be in a specific order (byte order, I think).

HOWEVER, the available library makes everything waaaaay easier. I've been using it for weeks now. It converts the XLM responses into an object that holds all the data and is easy to use.

I recently answered the question here: https://stackoverflow.com/a/33617604/5543992

Community
  • 1
  • 1
Jeffrey
  • 143
  • 2
  • 10