Blog

· 3 min read

Build vs. buy: what a 'post to social' feature really costs

A line-by-line breakdown of building social media posting into your product yourself, compared with using a social media API.

The ticket says: "Let users share to X and LinkedIn." It looks like a sprint. Here's what's actually underneath it, so your estimate holds up.

The happy path (the part everyone estimates)

  • Register a developer app on each platform
  • Implement OAuth for each
  • Call each platform's "create post" endpoint

That's a few days per platform. If this were the whole job, you should build it.

What comes next (the part that blows up estimates)

Work itemWhy it's neededOngoing?
Token storage and encryptionA security review will ask where your customers' tokens liveYes
Token refresh per platformEvery network has different token lifetimes and refresh rulesYes
Per-platform content validationCharacter limits, media types, sizes and carousel counts all differYes, limits change
Media upload pipelinesImages and video use different upload flows per platformYes
Scheduling infrastructureMost products need "post later," and native support is inconsistentYes
Retries and idempotencyA retried request must never double-post a customer's announcement—
Failure notificationsUsers need to know a post didn't go out, and why—
Disconnection handlingUsers revoke access, and your UI needs to noticeYes
Rate limiting and backoffDifferent per platform, sometimes per userYes
Platform API changesEndpoints get deprecated, and policies and tiers changeForever

The last row is the expensive one. Social platforms change their APIs on their schedule, not yours. Each change is unplanned work pulled off your roadmap.

The questions to ask

  1. Is social posting your product, or a feature of it? If it's the core of what you sell, owning the stack may be worth it. If it's a feature, every hour spent on token refresh is an hour not spent on what customers pay you for.
  2. How many platforms will users ask for? It's never just the first two.
  3. Who's on call when LinkedIn rejects posts at 2am?

What buying looks like with Hapi

bash
curl -X POST https://hapi.tools/v1/posts \
  -H "Authorization: Bearer $HAPI_API_KEY" \
  -d '{"content":"Shipped!","platforms":["x","linkedin"]}'

Behind that one call:

  • Hosted OAuth with PKCE. Tokens are AES-256-GCM encrypted and refreshed for you.
  • Validation against real platform limits before a post is accepted.
  • Scheduling with timezone support.
  • Idempotency keys so retries never double-post.
  • Signed webhooks (post.published, post.failed, account.disconnected) with 6 retries.
  • Scoped API keys, an audit log, and role-based access for your team.

Live today on X, LinkedIn, Bluesky, Telegram, Discord and Slack, with Instagram, TikTok, YouTube and seven more in sandbox, so you can build against them now.

Cost comparison

Price your engineers' time on the table above, including the "Forever" row, and compare it with:

  • Trial: $5 for 15 days (5 accounts, 300 posts). Enough to build and demo the whole feature.
  • Growth: $49/mo, or $39/mo billed yearly. 25 accounts, 5,000 posts/month, webhooks, 300 requests/minute.
  • Pro: $99/mo, or $79/mo billed yearly. 100 accounts, 25,000 posts/month, 1,200 requests/minute.
  • Scale: from $199/mo with 250 accounts and 100,000 posts included, then pay per use. SSO and SLA available.

See pricing → or start your trial →