communication
rate_limiting
ai_generated
true
Slack API returns 429 Too Many Requests on one method while other methods work fine
ID: communication/slack-rate-limit-per-method-not-global
85%Fix Rate
88%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
Slack rate limits are per-method and per-workspace, not global. chat.postMessage has ~1 req/sec per channel. conversations.list has different limits. Hitting the limit on one method doesn't affect others. The Retry-After header tells you exactly how long to wait.
genericWorkarounds
-
92% success Implement per-method rate limiting using Slack's published tier limits
Tier 1: 1/min, Tier 2: 20/min, Tier 3: 50/min, Tier 4: 100/min. chat.postMessage is Tier 2-3 depending on context.
-
95% success Always respect the Retry-After header on 429 responses
retry_after = int(response.headers.get('Retry-After', 1)); time.sleep(retry_after) -
88% success Use Slack's Web API with built-in rate limit handling (slack_sdk)
from slack_sdk import WebClient; client = WebClient(token=token) # automatically handles rate limits with retries
Dead Ends
Common approaches that don't work:
-
Implement a single global rate limiter for all Slack API calls
82% fail
Rate limits are per-method. A global limiter is either too restrictive (slows unaffected methods) or too loose (still hits per-method limits).
-
Retry immediately on 429 response
88% fail
Immediate retry will also be rate-limited. Always respect the Retry-After header value.