0

When I run requests series like

https://api.sparkpost.com:443/api/v1/suppression-list/he**0@gmail.com

Sometimes, I get error:

name: 'SparkPostError', errors: [ { message: 'Too many requests' } ], statusCode: 429

Too many - this is how many? How long the server keeps track of period? How long the server resets the counter? How to solve this problem?

3 Answers3

0

https://developers.sparkpost.com/api/index.html#header-rate-limiting

After a quick look at the site...

Lode Vlaeminck
  • 894
  • 1
  • 9
  • 24
  • It was not sending emails and especially not test emails. I make a request to the API for Suppresoin List methods. Thanks for the answer, but you are given the answer for another question – Aleksei Oshmarin Sep 28 '16 at 14:14
  • Not a lot more information on the subject on the site, I would post a support ticket.. – Lode Vlaeminck Sep 28 '16 at 14:17
0

The answer of support

As mentioned before we do limit requests on our endpoints to prevent abuse and while we can’t reveal the actual limits we do recommend that you wait several seconds before making consecutive requests. If you are making these requests via some type of automated process (script, code, etc.), we highly recommend that you add a wait for several seconds upon seeing this 429 error and reattempt after. Decreasing the frequency of your requests and waiting before reattempting is the only way around this error message.

0

https://developers.sparkpost.com/api/index.html#header-rate-limiting

Rate Limiting Note: To prevent abuse, our servers enforce request rate limiting, which may trigger responses with HTTP status code 429. SparkPost implements rate limiting on the following API endpoints:

/api/v1/message-events

/api/v1/metrics/*

The limits imposed here are dynamic but as a general rule, polling these endpoints more than once in 2 minutes may encounter rate limiting and a 429 status code.