Ruby HTTPI gem for Amazon Product API returns SignatureDoesNotMatch

241 Views Asked by At

I've been debugging ASIN gem for Amazon product API which uses HTTPI.get(url) It was working fine until most recently, the HTTPI.get(url) request returns the following error:

HTTPI GET request to webservices.amazon.com (excon)
got response='<?xml version="1.0"?>
<ItemSearchErrorResponse 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>b73cc1c9-a682-453f-a8c8-1fcc5d1f3767</RequestId></ItemSearchErrorResponse>'

My httpi gem is v2.2.4 I also tried using HTTParty.get(url) which works fine

What could've caused this?

1

There are 1 best solutions below

0
Ian Lin On

This turned out to be a HTTPI versioning problem.

HTTPI 2.0.0 works properly, but latest version 2.2.4 has this issue