Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon Product API: ItemLookup with Multiple ASINs

So I'm having a bit of trouble figuring out why I get a particular error. [NOTE: I've masked my AccessKey and Signature parameters]

The url below returns valid xml for ONE product.

http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=[myAccessKey]&IdType=ASIN&ItemId=B002UD52WQ&Operation=ItemLookup&ResponseGroup=Medium&Service=AWSECommerceService&Timestamp=2010-07-27T23:17:57.000Z&Signature=[mySignature]

However, when I use the url below to look up multiple ASINs by comma-separating the ASIN IDs, I get an error

http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=[myAccessKey]&IdType=ASIN&ItemId=B002UD52WQ,B002C0CZEU&Operation=ItemLookup&ResponseGroup=Medium&Service=AWSECommerceService&Timestamp=2010-07-27T23:17:57.000Z&Signature=[mySignature]

ERROR 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

Anyone know why this is happening? Thanks in advance.

DOCUMENTATION CAN BE FOUND HERE "To look up more than one item at a time, separate the item identifiers by commas."

like image 227
st4ck0v3rfl0w Avatar asked Jul 27 '10 23:07

st4ck0v3rfl0w


1 Answers

Silly, but you have to URL encode the commas. Hope this helps someone out there.

like image 138
st4ck0v3rfl0w Avatar answered Oct 14 '22 14:10

st4ck0v3rfl0w