Hi I am having an api problem

Everytime i list past 200 listings i get prompted with - TooManyRequests is there anyway to change this so it keeps listing.

1 Like

@DarkKnight @DunnBiscuit @Sparkling_Juice

Hello @Colin_Kuchta,

If you received this error, this means that you have reached the scripting limit.

Please retry after some time ok.

Also, try to list in a lower rate to not reach the scripting limit and to avoid spamming listings in the marketplace.

God Speed! :trident:

3 Likes

Hi @DarkKnight i would like to list at a lower rate is their a certain command i can put in to make it wait after or before posting, and can i also ask what the limit of the api is to force the too many requests error if you could get back to me that’d help alot i have looked throughout the forums and scripting steps and i saw nowhere that indicates a slowing down or delay function

Hey @Colin_Kuchta,

I am not completely sure, but it could be this:

setTimeout(function() {
    return console.log(cue);
}, 5000);

hi @Aeralo i tried this and it said cue is not defined

Just a guess…

Your code is getting this error (status 422):
Onsale listing limit of 200 (current: 200)

Your code is handling the error by retrying again and again and again, etc
and getting throttled.

Sadly no I’m am getting an error that says too many requests

I use this rate limiter (there might be newer better ones)… promise-ratelimit - npm

npm install promise-ratelimit

To use it, you would do something like this

 const rateLimit = require('promise-ratelimit')(60*1000); /* rateInMilliseconds */

 for (let listing of listings) {
    await rateLimit();
    // create listing
 }
1 Like

Hmmm okay is there anyway I can edit the scripts to change all of my scripts at the same time otherwise I have to individually go through all of them to make this change?

Hello @Colin_Kuchta,

As far as I know, you will have to individually edit each of your listings to use it.

Actually, this line of code in the API sets a 1s rate limit per API call:

The GFAPI sample code could be updated to follow the whatever the enforced rate limit is. I will add an internal feature request for that, but don’t hold your breathe.