Skip to content

Social Media API Integration: Add Posting to Your App

Social media API integration for a SaaS app: how long each network's tokens last, which reviews you pass, how uploads work and when one API is the better build.

Social Media API Integration: Add Posting to Your App

A social media API integration lets your users connect their accounts and post from inside your app. The hard parts are the sign-in tokens, each network’s app review and media uploads. Tokens last from 2 hours (X, TikTok) to 60 days (Instagram, Threads, LinkedIn), checked in each network’s docs on 26 November 2026. This PostNext guide covers the build, network by network.

Key Takeaways

  • Plan for token refresh from day one. X and TikTok access tokens last 2 hours. Instagram, Threads and LinkedIn tokens last 60 days. Google testing-mode refresh tokens expire after 7 days.
  • Each network reviews your app on its own. TikTok audits posting apps, Meta needs App Review and Business Verification, and LinkedIn vets company Page access.
  • Unaudited TikTok apps post privately. Up to 5 users in 24 hours, private posts only, on private accounts.
  • YouTube dropped its private-upload rule. Since 2 November 2026, uploads from unverified API projects are no longer held to private.
  • Uploads are jobs, not requests. TikTok, Instagram and YouTube process media after the call returns, so your app polls for status.
  • One API can cover several networks. A unified API takes on the sign-in flows and reviews. Check whether it lets your own customers connect their accounts.

What does a social media API integration need?

A social media API integration needs five parts for each network: an approved developer app, a sign-in flow (OAuth) for each user, token storage and refresh, a media upload path and error handling for limits and rejections. The first part decides your timeline, because review and audit can take longer than the code. The table shows the first two parts per network, read on 26 November 2026.

NetworkDeveloper app and permissionReview before real usersWhat happens before review
XDeveloper account, tweet.write and media.write scopesNone stated; pay per request with creditsWorks, billed per post
InstagramMeta app, Instagram professional accounts onlyApp Review and Business Verification for Advanced AccessStandard Access: only accounts with a role on your app
Facebook PagesMeta app with Page permissionsApp Review for users without a role on the appOnly people with a role on your app
ThreadsMeta app with Threads permissionsMeta App ReviewOnly people with a role on your app
LinkedIn”Share on LinkedIn” product, w_member_socialSelf-serve for personal posts; Community Management API is vettedCompany Pages need the vetted product
TikTokContent Posting API, video.publish scopeAudit5 users in 24 hours, private posts only
YouTubeGoogle Cloud project with the YouTube Data APINone for public uploads since 2 November 2026Default quota: 100 uploads a day
BlueskyOpen AT Protocol; OAuth or app passwordsNoneWorks within rate limits

Read on each network’s developer docs on 26 November 2026. For daily posting limits and prices, see our social media API guide.

APIs Explained in 6 Minutes!, a video by ByteByteGo
APIs Explained in 6 Minutes!ByteByteGo on YouTube · 6:41

How long do social media access tokens last?

Access tokens last from 2 hours to 60 days, and refresh tokens from 7 days to a year, depending on the network and your app’s status. X and TikTok access tokens expire after 2 hours. Instagram, Threads and LinkedIn tokens last 60 days. A Google project in “Testing” status gets refresh tokens that expire in 7 days.

Social media API token lifetimes: X and TikTok access tokens last 2 hours, highlighted; Instagram, Threads and LinkedIn access tokens last 60 days; Google refresh tokens for a YouTube app in Testing status expire in 7 days.

NetworkAccess tokenRefreshWhen the user must sign in again
X2 hoursRefresh token only with the offline.access scopeWhen they revoke access, if offline.access was granted
TikTok2 hoursRefresh token lasts 180 days; each refresh returns a new oneWhen the refresh token expires or they disconnect
Instagram (Instagram Login)60 days (long-lived)Refresh a token at least 24 hours old; it lasts 60 days againWhen the token expires unrefreshed
Facebook PagesUser token about 60 daysLong-lived Page tokens have no expiry dateWhen the token is invalidated, under conditions Meta lists
Threads1 hour short-lived, 60 days long-livedRefresh after 24 hours; permission grant lasts 90 daysPrivate profiles re-grant every 90 days
LinkedIn60 daysProgrammatic refresh tokens last 365 days, for approved partnersAt day 365, whatever you refresh
YouTube (Google)Short-livedRefresh token; 7 days in “Testing” status; expires after 6 months unusedAt those points, or past 100 tokens per account
BlueskyHandled by the OAuth session (DPoP, PKCE, PAR)SDKs refresh for youWhen the session ends

Read on each network’s authentication docs on 26 November 2026. TikTok’s docs say to use expires_in and refresh_expires_in instead of hard-coding these numbers.

Three rules follow from the table. Refresh in the background before a post is due, not at publish time. Store the newest refresh token every time, because TikTok returns a new one on each refresh. And publish your Google OAuth app before launch, or every YouTube user signs in again each week.

How do you get through each network’s app review?

Apply for each network’s review as soon as you have a working demo, because it gates real users. Meta needs App Review and Business Verification before your app serves accounts you do not manage. TikTok audits apps before their posts can be public. LinkedIn’s Community Management API, for company Pages, needs a screencast of each use case.

Bar chart of Meta App Review submission caps: 3 submissions in progress at once, highlighted, 15 per developer in any rolling 30 days and 30 per business portfolio in 30 days.

Meta (Instagram, Facebook, Threads). Standard Access is the default and covers accounts with a role on your app, which is enough for your own brand. Serving your customers’ Instagram accounts needs Advanced Access, which “requires App Review and Business Verification”. Meta also caps submissions: 3 in progress at once, and 15 per developer (30 per business portfolio) in any rolling 30 days. Send one complete request, not several partial ones.

TikTok. Until your app passes the audit, “Unaudited API Clients can allow up to 5 users to post in a 24 hour window”, posts are SELF_ONLY, and the accounts must be private while posting. The audit checks your posting screen against TikTok’s rules, so build those before you apply (next section).

LinkedIn. Posting to a member’s own profile needs the self-serve “Share on LinkedIn” product and the w_member_social permission. Posting to company Pages needs the Community Management API, a vetted product with a Development tier and a Standard tier. For Standard, you send a screencast that shows each use case in your request form.

YouTube. Google reversed its 2020 rule on 2 November 2026: “Videos uploaded through the videos.insert method from unverified API projects are no longer restricted to private viewing mode”. You still need a quota extension for more than the default 100 uploads a day, through YouTube’s quota extension form.

What must your posting screen show for TikTok?

TikTok sets rules for the screen where your users post, and its audit checks them. The screen shows the creator’s TikTok nickname, offers only the privacy options TikTok’s creator info call returns, with no default, and leaves comment, Duet and Stitch unchecked. It also shows a preview and a music usage consent line before the publish button.

The full list is in TikTok’s content sharing guidelines. The rules that change your design most:

  1. Call creator info first. Fetch the creator’s latest info each time the posting screen opens. If it says the creator cannot post now, stop and ask them to try later.
  2. Check video length. Compare the clip with max_video_post_duration_sec from that call. Different creators get different limits.
  3. No default privacy. The user picks a privacy level from a list, and the list has no preselected value.
  4. Interactions off by default. Comment, Duet and Stitch start unchecked. Grey out any the creator turned off in TikTok.
  5. Commercial content disclosure. A toggle for “your brand” or “branded content”. Branded content cannot be private.
  6. Consent line. Show “By posting, you agree to TikTok’s Music Usage Confirmation” before the publish button.

The Direct Post API also takes an is_aigc flag for AI-generated video, which adds TikTok’s AI label. Each user access token can call the Direct Post endpoint 6 times a minute, and each creator can post about 15 times a day across every app.

How do media uploads work in social media APIs?

Most networks take a file or a public URL, then process it after your request returns. TikTok accepts a file upload or a pull from a URL on a domain you have verified. Instagram and Threads create a media container first, then publish it. YouTube takes a resumable upload of up to 256 GB. Your app polls each job until it finishes or fails.

Instagram upload loop for an app: create a media container from a public file URL, poll the container once a minute for no more than 5 minutes, highlighted, then call media_publish when processing is done.

NetworkHow the file arrivesThenWatch for
TikTokFILE_UPLOAD (PUT to an upload URL) or PULL_FROM_URLProcessing runs after the upload; poll the publish statusPull needs a verified URL prefix or domain
InstagramPublic URL in a media containerPoll the container, then call media_publishPoll once a minute, for no more than 5 minutes; JPEG images only
ThreadsPublic URL in a media containerPublish the container250 API posts per profile in 24 hours
YouTubeResumable upload to videos.insertProcessing on YouTubePrivacy defaults to public if you send none
XMedia upload endpoint, then the postAttach the media ID to the postVideo up to 20 minutes and 8 GB on default accounts

Read on TikTok’s Direct Post reference, Meta’s content publishing guide, YouTube’s videos.insert reference and X’s media docs, October and November 2026.

Two habits save support tickets. Validate files before upload against each network’s rules, such as JPEG only for Instagram images. And set YouTube’s privacyStatus on every request: when it is missing, YouTube now defaults the video to public.

Should you build each integration or use one API?

Build native integrations when your product needs one or two networks in depth, such as every analytics field. Use a unified social media API when you need several networks and would rather not run each sign-in flow, review and token rule yourself. The provider holds the developer apps and passes the reviews, and your users connect through its sign-in.

QuestionBuild each networkUnified API
Who passes TikTok’s audit and Meta’s App Review?You, per networkThe provider
Who refreshes tokens?Your code, by each network’s rulesThe provider
Whose name does the user see at sign-in?Your appYours or the provider’s; check before you sign
What you payX per request; the others in engineering timeThe provider’s price per account or per post
RiskEach network changes its rules on its own timelineOne provider between you and every network

This table compares scope, not quality.

A rough count for seven networks, from the tables above: seven sign-in flows, at least three separate reviews (Meta, TikTok, LinkedIn for Pages), five token lifetimes and three upload patterns. That is the work a unified API takes off your list. Check three things in its docs before you choose one: whether your customers can connect their own accounts, whether it sends webhooks when a post publishes or fails, and which networks it cannot reach.

Where does PostNext’s API fit?

PostNext’s API fits a product team that posts from its own accounts, such as release notes or status updates your code schedules. One API key acts as one PostNext account, so your customers cannot connect their own accounts through it. It posts to X, Instagram, LinkedIn personal profiles, TikTok, YouTube, Threads and Bluesky. It has no webhooks or SDK.

What it does, from PostNext’s API reference on 26 November 2026:

  • One header. Every request sends the key in x-api-key to https://api-app.postnext.io.
  • Drafts or scheduled posts. POST /api/posts creates a draft, and POST /api/posts/schedule schedules one for a future time.
  • Media. Upload an image or video of up to 500 MB, from a file or a URL.
  • A person in the loop. Posts from code sit on the team’s calendar, where a teammate can edit or move them first.

So PostNext is not a way to let your customers post to their accounts from your app. It is a way to skip the sign-in flows and reviews for your company’s own channels. The social media API for developers page shows the setup, and AI assistants use the MCP server instead of the REST API.

A checklist for your social media API integration

Before you write code, answer nine questions from each network’s own docs: which accounts can post, which review applies, how long tokens last, how uploads arrive, the daily posting limit, the posting screen rules, the error codes, the cost and who sees which app name at sign-in. Each answer below links to the section above that covers it.

  1. Accounts. Instagram posts only to professional accounts. LinkedIn company Pages need the vetted product.
  2. Review. Apply to Meta, TikTok and LinkedIn as soon as you have a demo.
  3. Tokens. Refresh before expiry, store the newest refresh token, and publish your Google OAuth app.
  4. Uploads. Poll each job. Set YouTube’s privacy on every request.
  5. Limits. Threads 250 posts in 24 hours, Instagram 100, TikTok about 15 per creator.
  6. Screen rules. TikTok’s posting screen rules, before the audit.
  7. Errors. Map each network’s rate-limit and media errors to one message your users understand.
  8. Cost. X charges $0.015 per post and $0.20 for a post with a link, on its pricing page in November 2026.
  9. Sign-in name. Decide whether users see your app’s name or a provider’s.

For the wider question of what to automate and what to keep by hand, see our guide to automating social media posting. If your users will ask an AI assistant to post, read how a social media AI agent works first.

Frequently Asked Questions

How do I integrate social media into my app?

Register a developer app with each network, request the posting permission, build the OAuth sign-in so each user grants access, store and refresh their tokens, and upload media in each network’s format. Pass each network’s review before real users post. A unified API can replace most of these steps.

How long does TikTok’s API audit take?

TikTok does not publish a time on the pages we read. Until the audit passes, posts are private and only 5 users can post through your app in 24 hours. Build the posting screen rules from TikTok’s content sharing guidelines before you apply.

Why do my YouTube API uploads go private?

Since 2 November 2026 they should not because of verification. YouTube ended the rule that held uploads from unverified projects to private. Check your privacyStatus value and the channel’s own upload defaults, which can still set some uploads to private.

How long does an Instagram API token last?

A long-lived Instagram user access token lasts 60 days. You can refresh it once it is at least 24 hours old and has not expired, and the refreshed token lasts another 60 days. An expired token means the user signs in again.

Can my users post to a LinkedIn company page through my app?

Only with LinkedIn’s Community Management API, a vetted product. You start on a Development tier and apply for the Standard tier with a screencast of each use case. Personal profile posting uses the self-serve Share on LinkedIn product.

Do I need a unified social media API?

Not for one or two networks you need in depth. For several networks, a unified API saves the sign-in flows, reviews and token rules. Check that your customers can connect their own accounts through it, and which networks it leaves out.

Sources

Chris

Head of Content at PostNext

Chris leads content and oversees development across the services this blog covers. The guides and tool comparisons here come out of the same decisions that shape what ships.

Follow along on Instagram at @postnextio for campaign breakdowns.

Your next week of posts, scheduled today

Write them yourself or ask your AI. PostNext publishes each post at the time you pick.

Plan, write and schedule your posts, with AI help when you want it.Plan and schedule your posts.