# Instagram, TikTok, and YouTube

Connect accounts, attach media, and select publication options for Instagram, TikTok, and YouTube.

Source: https://opensocial.run/docs/video-platforms
Markdown: https://opensocial.run/docs/video-platforms.md



Use the dashboard, REST API, CLI, SDK, or MCP tools to publish to these platforms.
Read [Getting started](https://opensocial.run/docs/getting-started) for account and client connection.

## Connect an account [#connect-an-account]

Open [Accounts](https://opensocial.run/dashboard/accounts), select **Connect an account**, and choose
a platform. Complete the platform sign-in and grant the requested permissions.
For REST, send `POST /v1/accounts/{platform}/connect` and open the returned
`authorization_url`.

Instagram requires a professional Business or Creator account. For YouTube,
select a Google account with a YouTube channel. Check that the connected account
is the account you intend to publish to.

If the dashboard shows **Setup required**, contact the service administrator.
If platform sign-in fails, check that you selected the correct account and
accepted the requested permissions.

## Attach media [#attach-media]

The dashboard post dialog can upload images and video. It shows a video preview
and the platform options. Read `GET /v1/capabilities?platform=PLATFORM` for the
supported file types and size limits before you upload.

REST clients call `POST /v1/media`, upload bytes to the returned `upload_url`,
then call `POST /v1/media/{id}/complete`. Include `duration_ms` for TikTok videos.
Optional metadata includes `width`, `height`, and `alt_text`. See the
[API media instructions](https://opensocial.run/docs/api#media).

The CLI can upload a video and supply its duration:

```sh
bun run cli -- media upload clip.mp4 --duration-ms 12000
```

| Platform  | Supported attachments                                                                                                                                            |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Instagram | One JPEG photo, a carousel of 2–10 JPEG photos, or one MP4/MOV Reel. Photos can be up to 8 MiB each. A Reel can be up to 1 GiB and 3 seconds to 15 minutes long. |
| TikTok    | One MP4, MOV, or WebM video. Read current creator options for the maximum duration.                                                                              |
| YouTube   | One MP4, MOV, or WebM video.                                                                                                                                     |

The service file limit is 2 GiB. Platform and account limits can be lower.
Instagram video carousels and Stories are not supported. TikTok photo posts,
inbox uploads, and commercial content are not supported.

## Set publication options [#set-publication-options]

Set `platform_options` on each publication target. The same object is accepted
by `POST /v1/posts` and `POST /v1/posts/validate`.

### YouTube [#youtube]

```json
{
  "content": { "text": "A short product tour" },
  "media": ["med_YOUR_VIDEO"],
  "publications": [
    {
      "account_id": "acct_YOUR_YOUTUBE_CHANNEL",
      "platform_options": {
        "title": "Product tour",
        "privacy_status": "private",
        "made_for_kids": false
      }
    }
  ]
}
```

YouTube requires a title of 1–100 characters without `<` or `>`.
`privacy_status` can be `private` (the default), `unlisted`, or `public`.
`made_for_kids` is optional. The post text becomes the video description.

### TikTok [#tiktok]

Before each TikTok post, read `GET /v1/accounts/{id}/publishing-options` or call
`social_account_publishing_options`. The result contains the creator identity,
`privacy_level_options`, interaction settings, and `max_video_post_duration_sec`.
Show these choices to the creator. Ask the creator to select a privacy level.
Do not select a default privacy level for the creator.

```json
{
  "privacy_level": "SELF_ONLY",
  "consent": true,
  "disable_comment": true,
  "disable_duet": true,
  "disable_stitch": true
}
```

Use this example only if `SELF_ONLY` is available and the creator selects it.
Set `consent: true` only after the creator agrees to send this video with the
selected settings. This integration supports videos that do not promote a brand
or business. Interaction controls default to disabled. The creator's disabled
settings take priority. An unavailable privacy choice is rejected; ask the
creator to choose again.

### CLI, SDK, and MCP [#cli-sdk-and-mcp]

```sh
bun run cli -- accounts publishing-options acct_TIKTOK
bun run cli -- posts validate --text "A short clip" --account acct_TIKTOK --media med_VIDEO --option tiktok.privacy_level=SELF_ONLY --option tiktok.consent=true
bun run cli -- posts create --text "Video description" --account acct_YOUTUBE --media med_VIDEO --option youtube.title="My video" --option youtube.privacy_status=private
```

The SDK provides `accounts.publishingOptions(id)` and
`media.upload({ durationMs, ... })`. The MCP upload tool accepts `duration_ms`.
MCP post creation and validation accept `platform_options`.

## Check publication results [#check-publication-results]

Publishing can take time while a platform processes the video. Read the post
and each publication status, or use webhooks for updates. A pending publication
is not a successful publication.

Reconnect an account with status `needs_reconnect`. For other failures, read
the publication error and correct the reported problem before you retry.

If Instagram returns `instagram_publish_needs_reconciliation`, check the
Instagram account for the post before you retry. The post may already exist.

A private TikTok post can have no public post URL. In that case,
`external_post_id` contains the TikTok publish request ID.
A YouTube success means the upload was accepted and has a video ID. YouTube can
continue processing and apply visibility restrictions after the upload.
