Skip to content
Skillv1.0.0

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 ph

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (plugins/saas-packs/hootsuite-pack/skills/hootsuite-rate-limits/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill hootsuite-rate-limits. Copyright stays with the author (MIT).

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() }),
    })
  );
}

Prerequisites

  • An approved API budget, header baseline, draft-only sandbox profile, and bounded queue.
  • Idempotency keys for mutations plus a reviewed recovery path for exhausted work.

Output

Return a rate-limit receipt with account scope, requested/limited/deferred counts, retry revision, idempotency state, queue health, draft/public assertion, and rollback reference. Exclude copy, media, handles, and credentials.

Error Handling

Stop for unknown profile, quota saturation, an attempt to replay a public mutation, or a public-post path during recovery. Defer or cancel work rather than bypassing approval or account scope.

Examples

scope=sandbox-brand; requested=100; limited=3; deferred=3; retry=v2; idempotent=pass; public_posts=0; rollback=limits-r7 proves bounded handling.

Resources

Next Steps

For security, see hootsuite-security-basics.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-hootsuite-rat-8fda66/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-hootsuite-rat-8fda66.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-hootsuite-rat-8fda66",
  "kind": "skill",
  "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\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "saas",
      "hootsuite",
      "social-media",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "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\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/hootsuite-pack/skills/hootsuite-rate-limits/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/hootsuite-pack/skills/hootsuite-rate-limits/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/hootsuite-pack/skills/hootsuite-rate-limits/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit"
    ],
    "license": "MIT"
  },
  "instructions": "# Hootsuite Rate Limits\n\n## Overview\n\nHandle Hootsuite API rate limits. The API returns `429 Too Many Requests` with `Retry-After` headers when limits are exceeded.\n\n## Rate Limits\n\n| Endpoint | Limit | Window |\n|----------|-------|--------|\n| General API | Varies by plan | Per minute |\n| Message scheduling | ~100/hour | Per hour |\n| Media upload | ~50/hour | Per hour |\n| Token refresh | ~10/hour | Per hour |\n\n## Instructions\n\n### Step 1: Respect Retry-After Header\n\n```typescript\nasync function rateLimitedRequest(url: string, options: RequestInit = {}) {\n  const response = await fetch(url, {\n ",
  "cost": {
    "context_tokens": 659
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-hootsuite-rat-8fda66/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.