Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Denied Error #56

Closed
mohitgoyal201617 opened this issue Sep 22, 2018 · 1 comment
Closed

Access Denied Error #56

mohitgoyal201617 opened this issue Sep 22, 2018 · 1 comment
Assignees

Comments

@mohitgoyal201617
Copy link

Hi,

I am trying to use below mws api using this module. But getting Access Denied error. But things are working fine if I use the same api with same parameters using scratchpad.

var amazonMws = require('amazon-mws')('AWS_ACCESS_KEY_ID','Sec_key');

amazonMws.products.searchFor({
'Version': '2011-10-01',
'Action': 'GetLowestPricedOffersForSKU',
'SellerId': 'SellerID',
'MWSAuthToken': 'authtoken',
'MarketplaceId': 'A21TJRUUN4KGV',
'SellerSKU': 'skuid',
'ItemCondition': 'New'
}, function (error, response) {
if (error) {
console.log('error ', error);
return;
}
console.log('response ', response);
});

Response:

error { Type: 'Sender',
Code: 'AccessDenied',
Message: 'Access denied',
Headers:
{ 'x-mws-quota-max': 'unknown',
'x-mws-quota-remaining': 'unknown',
'x-mws-quota-resetson': 'unknown',
'x-mws-timestamp': '2018-09-22T16:16:09.909Z',
'content-type': 'text/xml',
'content-charset': 'unknown',
'content-length': '294',
'content-md5': 'unknown',
date: 'Sat, 22 Sep 2018 16:16:09 GMT' },
StatusCode: 401,
RequestId: '3511e62f-29e6-4112-bcb1-c938de071192' }

@bhushankummar bhushankummar self-assigned this Sep 23, 2018
@bhushankummar
Copy link
Owner

This may due to invalid HOST, access key, secret key combination.
The default host is :

mws.amazonservices.com

Are you working for India marketplace?
You should change HOST if you are working for the different marketplace.

    amazonMws.setHost('YOUR HOST');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants