javascript - AWS SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided -


i getting response request amazon product api.

    <?xml version="1.0"?> <itemsearcherrorresponse xmlns="http://ecs.amazonaws.com/doc/2011-08-01/"><error><code>signaturedoesnotmatch</code><message>the request signature calculated not match signature provided. check aws secret access key , signing method. consult service documentation details.</message></error><requestid>9aff7feb-7f9b-4efb-aece-b595b1b7b0e5</requestid></itemsearcherrorresponse> 

in javascript, generating signature as:

  var paramo = {     service:'awsecommerceservice',     operation:'itemsearch',     awsaccesskeyid:accesskeyid,     associatetag:associatetag,     version:'2011-08-01',     searchindex:'all',     keywords:name,     responsegroup:'itemattributes,offersummary',     timestamp:timestamp   };   var string='get\nwebservices.amazon.in\n/onca/xml\n';   console.log(string+$.param(paramo));   var hash = cryptojs.hmacsha256(string+$.param(paramo), secretaccesskey);   var signature = cryptojs.enc.base64.stringify(hash); 


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -