Agent skill
hootsuite-rate-limits
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".
Install this agent skill to your Project
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/tree/main/plugins/saas-packs/hootsuite-pack/skills/hootsuite-rate-limits
SKILL.md
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 * 1000));
return rateLimitedRequest(url, options); // Retry
}
return response;
}
Step 2: Queue-Based Scheduling
import PQueue from 'p-queue';
const hootsuiteQueue = new PQueue({
concurrency: 1,
interval: 1000,
intervalCap: 2, // 2 requests per second
});
async function queuedSchedule(profileId: string, text: string, time: Date) {
return hootsuiteQueue.add(() =>
fetch('https://platform.hootsuite.com/v1/messages', {
method: 'POST',
headers: { 'Authorization': `Bearer ${process.env.HOOTSUITE_ACCESS_TOKEN}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ text, socialProfileIds: [profileId], scheduledSendTime: time.toISOString() }),
})
);
}
Resources
Next Steps
For security, see hootsuite-security-basics.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
dockerfile-generator
Dockerfile Generator - Auto-activating skill for DevOps Basics. Triggers on: dockerfile generator, dockerfile generator Part of the DevOps Basics skill category.
branch-naming-helper
Branch Naming Helper - Auto-activating skill for DevOps Basics. Triggers on: branch naming helper, branch naming helper Part of the DevOps Basics skill category.
readme-generator
Readme Generator - Auto-activating skill for DevOps Basics. Triggers on: readme generator, readme generator Part of the DevOps Basics skill category.
makefile-generator
Makefile Generator - Auto-activating skill for DevOps Basics. Triggers on: makefile generator, makefile generator Part of the DevOps Basics skill category.
gitignore-generator
Gitignore Generator - Auto-activating skill for DevOps Basics. Triggers on: gitignore generator, gitignore generator Part of the DevOps Basics skill category.
pre-commit-hook-setup
Pre Commit Hook Setup - Auto-activating skill for DevOps Basics. Triggers on: pre commit hook setup, pre commit hook setup Part of the DevOps Basics skill category.
Didn't find tool you were looking for?