| name | hootsuite-rate-limits |
| description | Implement Hootsuite rate limiting, backoff, and idempotency patterns.
Use when handling rate limit errors, implementing retry logic,
or optimizing API request throughput for Hootsuite.
Trigger with phrases like "hootsuite rate limit", "hootsuite throttling",
"hootsuite 429", "hootsuite retry", "hootsuite backoff".
|
| allowed-tools | Read, Write, Edit |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","hootsuite","social-media"] |
| compatibility | Designed for Claude Code |
Hootsuite Rate Limits
Overview
Handle Hootsuite API rate limits. The API returns 429 Too Many Requests with Retry-After headers when limits are exceeded.
Rate Limits
| Endpoint | Limit | Window |
|---|
| General API | Varies by plan | Per minute |
| Message scheduling | ~100/hour | Per hour |
| Media upload | ~50/hour | Per hour |
| Token refresh | ~10/hour | Per hour |
Instructions
Step 1: Respect Retry-After Header
async function rateLimitedRequest(url: string, options: RequestInit = {}) {
const response = await fetch(url, {
...options,
headers: { 'Authorization': `Bearer ${process.env.HOOTSUITE_ACCESS_TOKEN}`, ...options.headers },
});
if (response.status === 429) {
const retryAfter = parseInt(response.headers.get('Retry-After') || '60');
console.log(`Rate limited. Retrying in ${retryAfter}s`);
await new Promise(r => setTimeout(r, retryAfter * ));
(url, options);
}
response;
}