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

You are submitting requests too quickly. Please retry your requests at a slower rate #104

Open
dheekshas opened this issue Nov 18, 2017 · 8 comments

Comments

@dheekshas
Copy link

I am getting this error though I am not making multiple calls at a time. My first call itself has thrown this error as per my log. Same API call is working after some time. Please guide me how to solve this issue.

Function usage:

var client = amazon.createClient({
awsId: "XXXXXXXXXXXXXXXXXXX",
awsSecret: "YYYYYYYYYYYYYYYYYYYYYYY",
awsTag: "ZZZZZZZZZZZZZZ"
});

console.log("Before making Amazon API");
client.itemLookup({
idType: 'ASIN',
itemId: BBBBBBBBBB, //This is valid amazon ASIN id
domain: 'webservices.amazon.in'
}).then(function (results) {
var result = JSON.stringify(results);
console.log("amaz success" + result);

    res.send(result);
}).catch(function (err) {
console.log("amaz error" + err);
var result = JSON.stringify(err);
result = "ErrorOccured" + result;
    res.send(result);        
});

Error:

{"$":{"xmlns":"http://ecs.amazonaws.com/doc/2013-08-01/\"},\"Error\":[{\"Code\":[\"RequestThrottled\"],\"Message\":[\"AWS Access Key ID: XXXXXXXXXXXXXXXX. You are submitting requests too quickly. Please retry your requests at a slower rate."]}],"RequestID":["5b1b2a16-1870-4884-9543-26d463955d94"]}"

@andreabisello
Copy link

Same issue,
and i'm running code manually, very slowly.
Here there are some info about limit (http://docs.aws.amazon.com/AWSECommerceService/latest/DG/TroubleshootingApplications.html)

@masterT
Copy link
Collaborator

masterT commented Dec 6, 2017

Check this issue #37

@50l3r
Copy link

50l3r commented Jan 28, 2019

Same issue,

I only execute one request in my code:

const amazon = require('amazon-product-api');
const credentials = require('./credentials.json');

const client = amazon.createClient(credentials);

client.itemSearch({
    director: 'Quentin Tarantino',
    actor: 'Samuel L. Jackson',
    searchIndex: 'DVD',
    audienceRating: 'R',
    responseGroup: 'ItemAttributes,Offers,Images',
}).then((results) => {
    console.log('OK');
    console.log(results);
}).catch((err) => {
    console.log('ERROR');
    console.log(err.Error);
});

Error:
[ { Code: [ 'RequestThrottled' ],
Message:
[ 'AWS Access Key ID: XXXXXXXXXXXXXXXXXXX. You are submitting requests too quickly. Please retry your requests at a slower rate.' ] } ]

@50l3r
Copy link

50l3r commented Jan 28, 2019

Solved adding the domain in request:

domain: 'webservices.amazon.es'

@Deepjyoti120
Copy link

how to add this

@geremora
Copy link

Solved using https://github.com/jhurliman/node-rate-limiter

Something like:

const RateLimiter = require('limiter').RateLimiter;
const limiter = new RateLimiter(1, 2000);

limiter.removeTokens(1, function() {
 client.itemLookup({...})
})

@adampatterson
Copy link

Might be related to some changes made to their API operating agreement.

https://docs.aws.amazon.com/AWSECommerceService/latest/DG/TroubleshootingApplications.html

Note that your account will lose access to Product Advertising API if it has not generated referring sales for a consecutive 30-day period.

I also read that in order to qualify access you need to make three sales, although I can not find that at this time.

@adampatterson
Copy link

Found it:

https://associates.amazon.ca/assoc_credentials/home

How do I get access to PA API?
In order to qualify for requesting access to PA API, you will need an associate account, you will have to complete three qualifying sales in the first 180 days and you will have to comply with the Operating Agreement. Once your account has been approved as an associate account, you will see a 'Request for PA API access' button below. You can click the button to get access to PA API.

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

7 participants