Social media API integration

Instagram, YouTube, X and TikTok API integration that keeps posting

Every network has its own login flow, scopes, media rules, rate limits and app review. Get one detail wrong and posts fail silently or accounts disconnect. We built direct publishing to Instagram, YouTube and X for our own platform, plus TikTok's Content Posting API, so we know each network's quirks.

  • Official APIs only, with the app reviews handled
  • Media checked against each network's limits before it's queued
  • Tokens refreshed per network before they expire

One post, four official APIs

  1. Instagram

    Business Login, then images, carousels of up to 10 items and Reels through content publishing. Comments synced, answered or hidden.

    • content_publish
    • manage_comments
    • manage_insights
  2. YouTube

    Google OAuth, resumable uploads and scheduling with YouTube's own publish time, including the altered-content disclosure.

    • resumable upload
    • publishAt
  3. X

    OAuth 2.0 with PKCE, posts of up to 280 characters, threads and chunked media upload of up to four files.

    • PKCE
    • threads
    • chunked upload
  4. TikTok

    The Content Posting API for photo posts of up to 35 images or a single video, with privacy, duet, stitch and AI-content settings.

    • photo posts
    • AIGC label
What Postcrest uses on each network.
What we can build

What we build on the social APIs

Publishing, engagement and statistics, as a standalone tool or inside your own product.

OAuth and account connection

Login flows per network, the right scopes, duplicate-account detection and a clear message when a Google login has no YouTube channel.

Auto-publishing

A queue that publishes images, carousels, Reels, Shorts, threads and videos at the scheduled time, with retries and clear errors.

Media processing

Videos re-encoded with ffmpeg to fit each network's limits, and media split and validated per network before anything is queued.

Comments

Instagram comments synced, answered, hidden or deleted from one place, with AI-drafted replies that a person approves.

Statistics

Reach, views, likes, saves and shares synced per post, on a schedule that checks new posts often and older posts less.

App reviews and compliance

Developer apps, permission reviews, deauthorisation and data-deletion callbacks, and AI-content labels where networks ask for them.

Proof, not promises

Built for our own social media platform

Postcrest schedules and publishes content for creators and marketers. It publishes directly to Instagram, YouTube and X, and TikTok publishing is built on the Content Posting API and in TikTok's review process. Until that audit passes, TikTok posts go out as private drafts.

Most of the work went into what the networks don't put on their landing pages: token lifetimes, media limits, review requirements and the gap between what an API documents and how it behaves.

  • Instagram tokens renewed when fewer than 7 days remain; X and YouTube 5 minutes before expiry; TikTok an hour before
  • Captions checked against Instagram's 2,200 characters and 30 hashtags before a post is queued
  • Reels re-encoded to at most 25 Mbps so Instagram accepts them
  • Unfinished connections expire after an hour, and an alarm fires when a network's connect success drops below 40%
  • Statistics for new posts refreshed every few minutes, slowing to once every two weeks as posts age
Postcrest's posts overview with scheduled Instagram carousels, their captions, publish times and status
Scheduled posts in Postcrest (test account name blurred).
network APIs integrated
4
networks with live direct publishing
3
between publishing queue runs
15 s
connect success below which an alarm fires
40%
Who it's for

Who we build social API integrations for

Social media tool startups

A scheduler or content platform that needs reliable publishing to several networks from day one.

SaaS products adding social features

Let your users publish or share to their own accounts straight from your product.

Agencies with their own tooling

Publish and report for many client accounts through your own workflow.

Publishers and media teams

Video pipelines that post Shorts, Reels and long-form video with the right formats and disclosures.

How it works

How we build a social media integration

Network APIs are strict, reviewed and change often. We plan for all three.

  1. 1

    Check what each API allows

    Content types, scopes, limits and review requirements per network, before the scope is fixed.

  2. 2

    Register the developer apps

    Apps with Meta, Google, X and TikTok, with the right permissions, privacy policy and callbacks.

  3. 3

    Build connect and refresh

    OAuth flows, token storage and refresh windows per network, with row locks against simultaneous refreshes.

  4. 4

    Build publishing per network

    Validation, media processing and the publish calls, each with its own error handling.

  5. 5

    Pass the reviews

    Screencasts, test accounts and documentation for each platform's app review.

  6. 6

    Monitor the connections

    Connect success per network, failed publishes and expiring tokens tracked, so problems surface early.

APIs and tooling

The official network APIs, Rails background jobs for publishing and syncing, and ffmpeg for video.

  • Instagram API
  • YouTube Data API
  • X API
  • TikTok Content Posting API
  • OAuth 2.0
  • PKCE
  • ffmpeg
  • Ruby on Rails
  • Solid Queue
  • Sentry
Cost & timeline

What does a social media API integration cost?

Mostly the number of networks and what you do on each. The estimate depends on:

Networks
Every network is its own integration, with its own authentication, rules and review.
Content types
Images are simple; carousels, Reels, Shorts, threads and long videos each need their own handling.
Reading as well as writing
Comments and statistics add scopes, syncing and extra review requirements.
App reviews
Preparing reviews takes work, and the platforms decide how long approval takes.
Volume
Many accounts and posts mean more attention to rate limits and the design of the queue.
FAQ

Questions about social media API integration

How much does an Instagram or TikTok API integration cost?

It depends on the number of networks, the content types and whether you also read comments and statistics. After a free intro call you get a written scope and estimate, often starting with one or two networks.

How long does a social media API integration take?

Building the integration is usually the quicker part. App reviews by Meta, Google, X and TikTok can take longer, and the platforms set that timeline. The estimate after the intro call includes a timeline per phase.

Can you post to Instagram automatically through the API?

Yes, for professional accounts through Instagram's official API: single images, carousels of up to 10 items and Reels, with captions checked against Instagram's limits before they're queued.

Do you handle the TikTok app audit?

Yes. We built the integration with TikTok's Content Posting API and prepare the audit. Until TikTok approves an app, posts can only be published as private, and we handle that automatically.

Can we schedule YouTube videos through the API?

Yes. We upload with YouTube's resumable upload and schedule with its own publish time, including title, tags, privacy, made-for-kids and the altered-content disclosure.

Can you integrate LinkedIn, Facebook or Pinterest?

We haven't built those yet. They have their own publishing APIs and review processes, and we'd follow the same approach as for Instagram, YouTube, X and TikTok.

Why do social accounts keep disconnecting?

Usually because tokens expire without being refreshed, or because two refreshes race each other. We refresh per network before expiry, under a lock, and track connect success, so a disconnect surfaces quickly instead of silently.

Need reliable publishing to social networks?

Tell us which networks, which content and how many accounts. You'll get an honest view on what each API allows, the reviews involved and what to build first.

martin@balk.dev

Typically a reply within one business day.

Useful to mention

  • What you want to build, in a few sentences
  • Who is going to use it
  • Any deadline or launch date
  • Tools and systems it should connect to