mardi 29 septembre 2015

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

I am getting this response to GET request to amazon product api.

    <?xml version="1.0"?>
<ItemSearchErrorResponse xmlns="http://ift.tt/1zDT4Ys"><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>9aff7feb-7f9b-4efb-aece-b595b1b7b0e5</RequestId></ItemSearchErrorResponse>

In my javascript, I am generating signature as:

  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);
  var paramO = {
    Service:'AWSECommerceService',
    Operation:'ItemSearch',
    AWSAccessKeyId:AccessKeyId,
    AssociateTag:AssociateTag,
    Version:'2011-08-01',
    SearchIndex:'All',
    Keywords:name,
    ResponseGroup:'ItemAttributes,OfferSummary',
    Timestamp:timestamp,
    Signature:signature
  };




1 commentaire:

  1. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Postgresql Admin
    , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on in Postgresql Admin We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com


    RépondreSupprimer