error regarding signature when trying to send an http post request to the submitfeed api /

Published at 2018-09-07 23:27:51

Home / Categories / Api / error regarding signature when trying to send an http post request to the submitfeed api
I am trying to generate and send an HTTP post request to the SubmitFeed API which is part of the feed APIs from amazon MWS.
I retain getting the following
error.
HTTP operation failed invoking https://mws.amazonservices.com/?AWSAccessKeyId=AKIAIGGOD6TP2MU3QSIA&Action=SubmitFeed&Merchant=A3EHHQS88SHP31&MWSAuthToken=amzn.mws.4ab2a0a1-9179-fb5a-a755-d3981035aa1b&SignatureVersion=2&Timestamp=2018-09-07T18%3A41%3A31.652Z&Version=2009-01-01&ContentMD5Value=oImnsIniaTslNJPJp9%2FvUw%3D%3D&Signature=OKUMSIF70eh3TkwEmIkSg3izagBOo8wp4ES0q3dgKRg%3D&SignatureMethod=HmacSHA256&FeedType=_POST_PRODUCT_DATA_&PurgeAndReplace= with statusCode: 403The responsebody has the following message.
SignatureDoesNot
Match
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.
I checked my canonical string again and again for each parameter to see all required parameters are present and are url encoded. I acquire used the sample code for generating signature given in the document.
Here is my canonical string which is used to generate the signature.
POST
mws.a
mazonservices.com
/
AWSAccessKeyId=AKIAIGGOD6TP2MU3QSIA&Action=SubmitFeed&ContentMD5Value=oImnsIniaTslNJPJp9%2FvUw%3D%3D&FeedType=_POST_PRODUCT_DATA_&MWSAuthToken=amzn.mws.4ab2a0a1-9179-fb5a-a755-d3981035aa1b&Merchant=A3EHHQS88SHP31&PurgeAndReplace=untrue&Version=2009-01-01I tried the SubmitFeed API on the scratchpad with the same credentials and request body and it goes through. I compared the canonical string on scratchpad and it is similar to my generated canonical string above in terms of parameters and order.I also checked the debugger for the URL sent by the scratchpad and its similar to my URL above which returns the signature not matching error.
Am I
missing something? Why does the amazon generated signature string not match my signature string.

Source: amazon.com

Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0