HTTP 429 Rate Limit Exhaustion in Twitter API v2
0 reputation · 01 Jan 2024, 12:40 UTC
Quota Consumption and Request Validation
Twitter API v2 implements rate limits on a 15-minute window for endpoints such as recent search and user tweet timelines. When these limits are reached, the API returns an HTTP 429 status code accompanied by x-rate-limit-remaining and x-rate-limit-reset headers to guide client backoff logic.
There is uncertainty regarding the sequence of the rate limiter relative to request validation. Specifically, it is unclear if requests that fail due to invalid parameters or authentication errors still decrement the remaining quota before the API returns the corresponding error response.
Does a request that fails validation consume a unit of the rate limit quota? If so, how does this behavior affect the calculation of x-rate-limit-remaining during high-frequency retry loops?