Amazon MWS API request error
I am having some trouble with mws-sdk-promises library(https://www.npmjs.com/package/mws-sdk-promises).
I am getting this error. I've double checked all the plug in infos are correct. I haven no idea why I am getting this block. How can I fix this?
--------
{"ErrorResponse":{"$":{"xmlns":"https://mws.amazonservices.com/Orders/2013-09-01"},"Error":[{"Type":["Sender"],"Code":["SignatureDoesNotMatch"],"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."]}],"RequestID":["e262570a-f493-4d3b-9183-88e528225599"]}}
--------
var express = require('express');
var router = express.Router();
var MWS = require('mws-sdk-promises'),
client = new MWS.Client(process.env.AWS_ACCESS_KEY_ID, process.env.SECRET_ACCESS_KEY, process.env.MERCHANT_SELLER_ID, {}),
MarketplaceId = process.env.MARKET_PLACE_ID;
router.get('/', function(req, res, next) {
function getListOrders(client, args) {
var req = MWS.Orders.requests.ListOrders();
req.set('CreatedAfter', args.CreatedAfter);
req.set('CreatedBefore', args.CreatedBefore);
req.set('LastUpdatedAfter', args.LastUpdatedAfter);
req.set('MarketplaceId', args.MarketplaceId);
req.set('LastUpdatedBefore', args.LastUpdatedBefore);
req.set('OrderStatus', args.OrderStatus);
req.set('FulfillmentChannel', args.FulfillmentChannel);
req.set('PaymentMethod', args.PaymentMethod);
req.set('BuyerEmail', args.BuyerEmail);
req.set('SellerOrderId', args.SellerOrderId);
req.set('MaxResultsPerPage', args.MaxResultsPerPage);
return client.invoke(req);
}
var date = new Date();
getListOrders(client, {
MarketplaceId: MarketplaceId,
MaxResultsPerPage: 10,
CreatedAfter: new Date(2016, 09, 1),
CreatedBefore: new Date(2015, 1, 31)
})
.catch(function(error) {
console.error("-----ERROR");
console.error(error);
})
.then(function(RESULT){
console.log("--------RESULT");
console.log(JSON.stringify(RESULT));
console.log("--------");
});
});
module.exports = router;
javascript amazon amazon-mws
add a comment |
I am having some trouble with mws-sdk-promises library(https://www.npmjs.com/package/mws-sdk-promises).
I am getting this error. I've double checked all the plug in infos are correct. I haven no idea why I am getting this block. How can I fix this?
--------
{"ErrorResponse":{"$":{"xmlns":"https://mws.amazonservices.com/Orders/2013-09-01"},"Error":[{"Type":["Sender"],"Code":["SignatureDoesNotMatch"],"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."]}],"RequestID":["e262570a-f493-4d3b-9183-88e528225599"]}}
--------
var express = require('express');
var router = express.Router();
var MWS = require('mws-sdk-promises'),
client = new MWS.Client(process.env.AWS_ACCESS_KEY_ID, process.env.SECRET_ACCESS_KEY, process.env.MERCHANT_SELLER_ID, {}),
MarketplaceId = process.env.MARKET_PLACE_ID;
router.get('/', function(req, res, next) {
function getListOrders(client, args) {
var req = MWS.Orders.requests.ListOrders();
req.set('CreatedAfter', args.CreatedAfter);
req.set('CreatedBefore', args.CreatedBefore);
req.set('LastUpdatedAfter', args.LastUpdatedAfter);
req.set('MarketplaceId', args.MarketplaceId);
req.set('LastUpdatedBefore', args.LastUpdatedBefore);
req.set('OrderStatus', args.OrderStatus);
req.set('FulfillmentChannel', args.FulfillmentChannel);
req.set('PaymentMethod', args.PaymentMethod);
req.set('BuyerEmail', args.BuyerEmail);
req.set('SellerOrderId', args.SellerOrderId);
req.set('MaxResultsPerPage', args.MaxResultsPerPage);
return client.invoke(req);
}
var date = new Date();
getListOrders(client, {
MarketplaceId: MarketplaceId,
MaxResultsPerPage: 10,
CreatedAfter: new Date(2016, 09, 1),
CreatedBefore: new Date(2015, 1, 31)
})
.catch(function(error) {
console.error("-----ERROR");
console.error(error);
})
.then(function(RESULT){
console.log("--------RESULT");
console.log(JSON.stringify(RESULT));
console.log("--------");
});
});
module.exports = router;
javascript amazon amazon-mws
add a comment |
I am having some trouble with mws-sdk-promises library(https://www.npmjs.com/package/mws-sdk-promises).
I am getting this error. I've double checked all the plug in infos are correct. I haven no idea why I am getting this block. How can I fix this?
--------
{"ErrorResponse":{"$":{"xmlns":"https://mws.amazonservices.com/Orders/2013-09-01"},"Error":[{"Type":["Sender"],"Code":["SignatureDoesNotMatch"],"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."]}],"RequestID":["e262570a-f493-4d3b-9183-88e528225599"]}}
--------
var express = require('express');
var router = express.Router();
var MWS = require('mws-sdk-promises'),
client = new MWS.Client(process.env.AWS_ACCESS_KEY_ID, process.env.SECRET_ACCESS_KEY, process.env.MERCHANT_SELLER_ID, {}),
MarketplaceId = process.env.MARKET_PLACE_ID;
router.get('/', function(req, res, next) {
function getListOrders(client, args) {
var req = MWS.Orders.requests.ListOrders();
req.set('CreatedAfter', args.CreatedAfter);
req.set('CreatedBefore', args.CreatedBefore);
req.set('LastUpdatedAfter', args.LastUpdatedAfter);
req.set('MarketplaceId', args.MarketplaceId);
req.set('LastUpdatedBefore', args.LastUpdatedBefore);
req.set('OrderStatus', args.OrderStatus);
req.set('FulfillmentChannel', args.FulfillmentChannel);
req.set('PaymentMethod', args.PaymentMethod);
req.set('BuyerEmail', args.BuyerEmail);
req.set('SellerOrderId', args.SellerOrderId);
req.set('MaxResultsPerPage', args.MaxResultsPerPage);
return client.invoke(req);
}
var date = new Date();
getListOrders(client, {
MarketplaceId: MarketplaceId,
MaxResultsPerPage: 10,
CreatedAfter: new Date(2016, 09, 1),
CreatedBefore: new Date(2015, 1, 31)
})
.catch(function(error) {
console.error("-----ERROR");
console.error(error);
})
.then(function(RESULT){
console.log("--------RESULT");
console.log(JSON.stringify(RESULT));
console.log("--------");
});
});
module.exports = router;
javascript amazon amazon-mws
I am having some trouble with mws-sdk-promises library(https://www.npmjs.com/package/mws-sdk-promises).
I am getting this error. I've double checked all the plug in infos are correct. I haven no idea why I am getting this block. How can I fix this?
--------
{"ErrorResponse":{"$":{"xmlns":"https://mws.amazonservices.com/Orders/2013-09-01"},"Error":[{"Type":["Sender"],"Code":["SignatureDoesNotMatch"],"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."]}],"RequestID":["e262570a-f493-4d3b-9183-88e528225599"]}}
--------
var express = require('express');
var router = express.Router();
var MWS = require('mws-sdk-promises'),
client = new MWS.Client(process.env.AWS_ACCESS_KEY_ID, process.env.SECRET_ACCESS_KEY, process.env.MERCHANT_SELLER_ID, {}),
MarketplaceId = process.env.MARKET_PLACE_ID;
router.get('/', function(req, res, next) {
function getListOrders(client, args) {
var req = MWS.Orders.requests.ListOrders();
req.set('CreatedAfter', args.CreatedAfter);
req.set('CreatedBefore', args.CreatedBefore);
req.set('LastUpdatedAfter', args.LastUpdatedAfter);
req.set('MarketplaceId', args.MarketplaceId);
req.set('LastUpdatedBefore', args.LastUpdatedBefore);
req.set('OrderStatus', args.OrderStatus);
req.set('FulfillmentChannel', args.FulfillmentChannel);
req.set('PaymentMethod', args.PaymentMethod);
req.set('BuyerEmail', args.BuyerEmail);
req.set('SellerOrderId', args.SellerOrderId);
req.set('MaxResultsPerPage', args.MaxResultsPerPage);
return client.invoke(req);
}
var date = new Date();
getListOrders(client, {
MarketplaceId: MarketplaceId,
MaxResultsPerPage: 10,
CreatedAfter: new Date(2016, 09, 1),
CreatedBefore: new Date(2015, 1, 31)
})
.catch(function(error) {
console.error("-----ERROR");
console.error(error);
})
.then(function(RESULT){
console.log("--------RESULT");
console.log(JSON.stringify(RESULT));
console.log("--------");
});
});
module.exports = router;
javascript amazon amazon-mws
javascript amazon amazon-mws
asked Nov 28 '16 at 19:15
Pak ChuPak Chu
7810
7810
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Are you sure that your ENV variables are correct? It seems like an authentication error.
Double check these env variables:
AWS_ACCESS_KEY_ID
SECRET_ACCESS_KEY
MERCHANT_SELLER_ID
Your time and timezone has to be correct. Did you check this too?
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f40851779%2famazon-mws-api-request-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Are you sure that your ENV variables are correct? It seems like an authentication error.
Double check these env variables:
AWS_ACCESS_KEY_ID
SECRET_ACCESS_KEY
MERCHANT_SELLER_ID
Your time and timezone has to be correct. Did you check this too?
add a comment |
Are you sure that your ENV variables are correct? It seems like an authentication error.
Double check these env variables:
AWS_ACCESS_KEY_ID
SECRET_ACCESS_KEY
MERCHANT_SELLER_ID
Your time and timezone has to be correct. Did you check this too?
add a comment |
Are you sure that your ENV variables are correct? It seems like an authentication error.
Double check these env variables:
AWS_ACCESS_KEY_ID
SECRET_ACCESS_KEY
MERCHANT_SELLER_ID
Your time and timezone has to be correct. Did you check this too?
Are you sure that your ENV variables are correct? It seems like an authentication error.
Double check these env variables:
AWS_ACCESS_KEY_ID
SECRET_ACCESS_KEY
MERCHANT_SELLER_ID
Your time and timezone has to be correct. Did you check this too?
answered Jan 3 at 12:38
Nepomuk FrädrichNepomuk Frädrich
1,4781526
1,4781526
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f40851779%2famazon-mws-api-request-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown