Skip to content
OpenSmartRoute
Skillv1.0.0

hootsuite-hello-world

Create a minimal working Hootsuite example. Use when starting a new Hootsuite integration, testing your setup, or learning basic Hootsuite API patterns. Trigger with phrases like "hootsuite hello worl

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-hello-world/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill hootsuite-hello-world. Copyright stays with the author (MIT).

Hootsuite Hello World

Overview

List your social media profiles and schedule a post using the Hootsuite REST API. The API base URL is https://platform.hootsuite.com/v1/.

Prerequisites

  • Completed hootsuite-install-auth setup
  • Valid access token
  • At least one social profile connected in Hootsuite

Instructions

Step 1: List Social Profiles

// hello-hootsuite.ts
import 'dotenv/config';

const TOKEN = process.env.HOOTSUITE_ACCESS_TOKEN!;
const BASE = 'https://platform.hootsuite.com/v1';

async function listProfiles() {
  const response = await fetch(`${BASE}/socialProfiles`, {
    headers: { 'Authorization': `Bearer ${TOKEN}` },
  });
  const { data } = await response.json();

  for (const profile of data) {
    console.log(`${profile.type}: @${profile.socialNetworkUsername} (ID: ${profile.id})`);
  }
  return data;
}

listProfiles().catch(console.error);

Step 2: Schedule a Post

async function schedulePost(socialProfileId: string, text: string, scheduledAt: Date) {
  const response = await fetch(`${BASE}/messages`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${TOKEN}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      text,
      socialProfileIds: [socialProfileId],
      scheduledSendTime: scheduledAt.toISOString(),
      emailNotification: false,
    }),
  });

  const result = await response.json();
  console.log('Scheduled message ID:', result.data[0]?.id);
  console.log('State:', result.data[0]?.state);
  console.log('Scheduled for:', result.data[0]?.scheduledSendTime);
  return result;
}

// Schedule a post 1 hour from now
const profiles = await listProfiles();
if (profiles.length > 0) {
  const oneHourLater = new Date(Date.now() + 3600000);
  await schedulePost(profiles[0].id, 'Hello from the Hootsuite API!', oneHourLater);
}

Step 3: List Scheduled Messages

async function listMessages() {
  const response = await fetch(`${BASE}/messages?state=SCHEDULED&limit=10`, {
    headers: { 'Authorization': `Bearer ${TOKEN}` },
  });
  const { data } = await response.json();
  for (const msg of data) {
    console.log(`[${msg.state}] ${msg.text?.substring(0, 60)}... → ${msg.scheduledSendTime}`);
  }
}

Step 4: curl Quick Test

# List profiles
curl -s -H "Authorization: Bearer $HOOTSUITE_ACCESS_TOKEN" \
  https://platform.hootsuite.com/v1/socialProfiles | python3 -m json.tool

# Get current user
curl -s -H "Authorization: Bearer $HOOTSUITE_ACCESS_TOKEN" \
  https://platform.hootsuite.com/v1/me | python3 -m json.tool

Output

  • Listed social media profiles with IDs
  • Scheduled a post to a social profile
  • Retrieved scheduled messages

Error Handling

Error Cause Solution
401 Unauthorized Expired token Refresh token via OAuth flow
403 Forbidden Insufficient permissions Check app scopes
422 Unprocessable Invalid profile ID or past date Verify profile ID and future date
No profiles returned No social accounts connected Connect accounts in Hootsuite dashboard

Examples

Create a fictitious draft in a sandbox profile and record profile=hello-sandbox; content=fixture-only; approval=pending; audience=test-only; public_posts=0; cleanup=complete. Do not use a real account or post text as tutorial data.

Resources

Next Steps

Proceed to hootsuite-local-dev-loop for development workflow.

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-hel-d9ecd6/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-hel-d9ecd6.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-hootsuite-hel-d9ecd6",
  "kind": "skill",
  "name": "hootsuite-hello-world",
  "description": "Create a minimal working Hootsuite example. Use when starting a new Hootsuite integration, testing your setup, or learning basic Hootsuite API patterns. Trigger with phrases like \"hootsuite hello world\", \"hootsuite example\", \"hootsuite quick start\", \"simple hootsuite code\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding",
      "general_chat"
    ],
    "tags": [
      "skill-md",
      "saas",
      "hootsuite",
      "social-media",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Create a minimal working Hootsuite example. Use when starting a new Hootsuite integration, testing your setup, or learning basic Hootsuite API patterns. Trigger with phrases like \"hootsuite hello world\", \"hootsuite example\", \"hootsuite quick start\", \"simple hootsuite code\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/hootsuite-pack/skills/hootsuite-hello-world/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/hootsuite-pack/skills/hootsuite-hello-world/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/hootsuite-pack/skills/hootsuite-hello-world/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(npm:*),",
      "Bash(curl:*)"
    ],
    "license": "MIT"
  },
  "instructions": "# Hootsuite Hello World\n\n## Overview\n\nList your social media profiles and schedule a post using the Hootsuite REST API. The API base URL is `https://platform.hootsuite.com/v1/`.\n\n## Prerequisites\n\n- Completed `hootsuite-install-auth` setup\n- Valid access token\n- At least one social profile connected in Hootsuite\n\n## Instructions\n\n### Step 1: List Social Profiles\n\n```typescript\n// hello-hootsuite.ts\nimport 'dotenv/config';\n\nconst TOKEN = process.env.HOOTSUITE_ACCESS_TOKEN!;\nconst BASE = 'https://platform.hootsuite.com/v1';\n\nasync function listProfiles() {\n  const response = await fetch(`${BASE}",
  "cost": {
    "context_tokens": 927
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-hootsuite-hel-d9ecd6/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.