Subscribe to PHP Freaks RSS

429 Too Many Requests

syndicated from planet-php.net on June 4, 2019

If an service wants to limit the amount of requests clients make, they can use the 429 Too Many Requests status code to inform the client that they’ve exceeded it.



For example, perhaps an API wants to limit users to 100 HTTP requests per hour.



It’s possible to tell a client when they can make requests again with the Retry-After header, but this is optional.



Example



HTTP/1.1 429 Too Many Requests
Content-Type: text/plain
Retry-After: 3600

You exceeded the limit. Try again in an hour


References





Also see: