# TikTok

Source: https://docs.autessa.com/docs/tools/tiktok

> Tool types for uploading draft videos to a TikTok inbox and reading video and channel stats through a TikTok connector.

# TikTok

Upload a video into the connected TikTok account's drafts inbox, list the account's published videos, and read per-video and channel-level engagement straight from the TikTok API.

Every tool on this page requires a TikTok connector (see
[Connectors](/docs/guide/connectors.md)); pass its ID as `connectorId`.
Unlike the other social families there is no AutessaDB posts table — every
tool calls the TikTok API directly, and the draft upload lands in the
account's TikTok inbox for a human to review and publish from the TikTok
app (TikTok does not let third-party tools publish outright). TikTok's
refresh tokens expire after long inactivity; when that happens tools fail
with `REFRESH_TOKEN_EXPIRED` and the connector must be reauthorized.

## Upload a draft video **TOOL** `TIKTOK_CREATE_DRAFT`

Downloads the video from the publicly accessible `videoUrl` and uploads it
to TikTok, where it lands as a draft in the account's TikTok inbox — the
final publish happens manually in the TikTok app. `title` is capped at 150
characters and `description` at 2,200, and the three `disable*` flags
control whether comments, duets, and stitches are allowed on the eventual
post. The tool streams progress updates during the download and upload
phases and returns a `publishId` with `status = PROCESSING`; the video
appears in the drafts inbox once TikTok finishes processing it.

### Example

```json title="Tool config"
{
  "toolType": "TIKTOK_CREATE_DRAFT",
  "connectorId": "V1StGXR8Z5",
  "videoUrl": "@@{VIDEO_URL}",
  "title": "@@{VIDEO_TITLE}",
  "description": "@@{VIDEO_DESCRIPTION}",
  "disableComment": false,
  "disableDuet": false,
  "disableStitch": false
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — The connector ID for the TikTok connection References a connector by ID.
- `videoUrl` (string) — The publicly accessible URL of the video to upload (TikTok will fetch from this URL)
- `title` (string) — Video title (max 150 characters)
- `description` (string) — Video description (max 2200 characters)
- `disableComment` (boolean) — If true, disables comments on the video
- `disableDuet` (boolean) — If true, disables duet for the video
- `disableStitch` (boolean) — If true, disables stitch for the video

## Get all videos **TOOL** `TIKTOK_GET_ALL_VIDEOS`

Lists the connected account's published videos — the TikTok API does not
return drafts, so videos uploaded with the draft tool only show up here
after they are published from the app. `maxCount` defaults to 20, which is
also TikTok's per-page maximum; page further by passing the `nextCursor`
from a previous response as `cursor`, and check `hasMore`. Set `minimal` to
`true` to trim each video to `id`, `title`, `video_description`, and
`create_time` — useful when an agent only needs to pick a video.

### Example

```json title="Tool config"
{
  "toolType": "TIKTOK_GET_ALL_VIDEOS",
  "connectorId": "V1StGXR8Z5",
  "maxCount": 20,
  "cursor": 0,
  "minimal": true
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — The connector ID for the TikTok connection References a connector by ID.
- `maxCount` (integer) — Maximum number of videos to return (default 20, max 20 per TikTok API)
- `cursor` (integer) — Cursor for pagination from previous response
- `minimal` (boolean) — When true, returns minimal video info (id, title, video_description, create_time only)

## Get video by ID **TOOL** `TIKTOK_GET_VIDEO_BY_ID`

Fetches one video's full record by its TikTok `videoId`: title,
description, duration, cover image, embed link, creation time, and the
engagement counts. Use the list tool to discover video IDs first.

### Example

```json title="Tool config"
{
  "toolType": "TIKTOK_GET_VIDEO_BY_ID",
  "connectorId": "V1StGXR8Z5",
  "videoId": "@@{VIDEO_ID}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — The connector ID for the TikTok connection References a connector by ID.
- `videoId` (string) — The TikTok video ID to retrieve

## Get video stats **TOOL** `TIKTOK_GET_VIDEO_STATS`

Fetches live engagement metrics for one video by its TikTok `videoId`:
`view_count`, `like_count`, `comment_count`, and `share_count`. Note the ID
is TikTok's own video ID (as returned by the list tool), not an AutessaDB
record — this family has no drafts table.

### Example

```json title="Tool config"
{
  "toolType": "TIKTOK_GET_VIDEO_STATS",
  "connectorId": "V1StGXR8Z5",
  "videoId": "@@{VIDEO_ID}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — The connector ID for the TikTok connection References a connector by ID.
- `videoId` (string) — The TikTok video ID to get stats for

## Get channel stats **TOOL** `TIKTOK_GET_CHANNEL_STATS`

Fetches account-level metrics for the connected TikTok account:
`follower_count`, `following_count`, `likes_count` (total likes across all
videos), and `video_count`, alongside the account's display name. Takes
only the `connectorId` — there is nothing else to configure.

### Example

```json title="Tool config"
{
  "toolType": "TIKTOK_GET_CHANNEL_STATS",
  "connectorId": "V1StGXR8Z5"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — The connector ID for the TikTok connection References a connector by ID.

## Related

- [Tool Types overview](/docs/tools.md)
- [Tools guide](/docs/guide/agentic/tools.md)
- [Connectors guide](/docs/guide/connectors.md)
- [YouTube tool types](/docs/tools/youtube.md)
- [Instagram tool types](/docs/tools/instagram.md)
- [Facebook tool types](/docs/tools/facebook.md)

