# Tiktok

```json
{
  "name": "Tiktok",
  "slug": "tiktok",
  "url": "https://composio.dev/toolkits/tiktok",
  "markdown_url": "https://composio.dev/toolkits/tiktok.md",
  "logo_url": "https://logos.composio.dev/api/tiktok",
  "categories": [
    "social media"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-05-12T10:28:29.420Z"
}
```

![Tiktok logo](https://logos.composio.dev/api/tiktok)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Tiktok MCP or direct API to publish videos, fetch analytics, schedule uploads, and engage with comments through natural language.

## Summary

Tiktok is a short-form video platform for creating, sharing, and discovering viral content. It helps creators and brands reach massive audiences with creative tools and global social features.

## Categories

- social media

## Toolkit Details

- Tools: 10

## Images

- Logo: https://logos.composio.dev/api/tiktok

## Authentication

- **Oauth2**
  - Type: `oauth2`
  - Description: Oauth2 authentication for Tiktok.
  - Setup:
    - Configure Oauth2 credentials for Tiktok.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Upload a new video from my library
- List my most recent TikTok videos
- Fetch my latest TikTok follower stats
- Post a photo with a custom caption

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `TIKTOK_FETCH_PUBLISH_STATUS` | Fetch publish status | Check the processing status of a TikTok video or photo post using its publish_id. Use this action to poll the status of content after initiating an upload or post. The API returns detailed information about processing stages (upload, download, moderation) and any errors that occurred. Non-terminal statuses mean processing is still pending — never re-initiate TIKTOK_PUBLISH_VIDEO for the same publish_id. Use exponential backoff when polling (e.g., 5s→10s→20s) to avoid the 30 requests/minute per access token rate limit. |
| `TIKTOK_GET_ACTION_CATEGORIES` | Get action categories | Tool to retrieve available action categories from TikTok Marketing API. Use when you need to get the list of conversion event categories for creating or managing TikTok ad campaigns with conversion tracking. |
| `TIKTOK_GET_TERM` | Get terms | Tool to retrieve terms from TikTok Business API. Use when you need to fetch advertiser or agency terms for a specific advertiser ID. |
| `TIKTOK_GET_USER_STATS` | Get user stats | Fetches TikTok user information and statistics for the authenticated user. Retrieves user stats (follower_count, following_count, likes_count, video_count) and can optionally fetch profile fields (display_name, username, bio_description, etc.) and basic info (open_id, union_id, avatar URLs). Returns only the fields requested in the fields parameter. Only works for the authenticated account; cannot fetch arbitrary public profiles. Stats may be delayed and not reflect the most recent activity. |
| `TIKTOK_LIST_GMV_MAX_OCCUPIED_CUSTOM_SHOP_ADS` | List GMV Max occupied custom shop ads | Tool to get GMV Max occupied custom shop ads list for a TikTok advertiser. Use this action when you need to retrieve information about which custom shop ads are currently occupied for GMV Max campaigns. This is part of the TikTok Business API and requires appropriate advertiser access. |
| `TIKTOK_LIST_VIDEOS` | List videos | Lists videos for the authenticated user (or specified creator). Does not provide a global TikTok-wide feed. |
| `TIKTOK_POST_PHOTO` | Post photo | Create a photo post (1-35 images) on TikTok via Content Posting API. Supports two modes: - MEDIA_UPLOAD: Uploads photos to user's inbox for review/editing before posting - DIRECT_POST: Immediately posts photos to user's TikTok account IMPORTANT: Photo URLs must be from your TikTok-verified domain. Unverified domains will return 403 Forbidden. Unaudited apps can only post with privacy='SELF_ONLY'. Rate limit: 6 requests per minute per user access token. Reference: https://developers.tiktok.com/doc/content-posting-api-reference-photo-post |
| `TIKTOK_PUBLISH_VIDEO` | Publish video | Publishes a video to TikTok by pulling it from a public URL. TikTok downloads the video from the provided URL and publishes it directly to the creator's profile. Publishing is asynchronous — after calling this action, poll TIKTOK_FETCH_PUBLISH_STATUS with the returned publish_id to check completion. For uploading video files instead of URLs, use TIKTOK_UPLOAD_VIDEO. |
| `TIKTOK_UPLOAD_VIDEO` | Upload video | Uploads a video to TikTok via the Content Posting API (init + single-part upload). This action initializes an upload session to obtain a presigned upload URL, then uploads the entire file with a single PUT request. Use a subsequent action to publish the post. Ensure the video file is fully generated and available before calling this action. |
| `TIKTOK_UPLOAD_VIDEOS` | Upload videos (batch) | Uploads multiple videos to TikTok concurrently (init + single-part upload per file). |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK
```python
pip install composio_openai
```

```typescript
npm install @composio/openai
```

#### Path 1, Step 2: Initialize Composio and Create Tool Router Session

Import and initialize Composio client, then create a Tool Router session
```python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
```

```typescript
import OpenAI from 'openai';
import { Composio } from '@composio/core';
import { OpenAIResponsesProvider } from '@composio/openai';

const composio = new Composio({
  provider: new OpenAIResponsesProvider(),
});
const openai = new OpenAI({});
const session = await composio.create('your-user-id');
```

#### Path 1, Step 3: Execute Tiktok Tools via Tool Router with Your Agent

Get tools from Tool Router session and execute Tiktok actions with your Agent
```python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'Upload a new video and publish to my followers'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(result)
```

```typescript
const tools = session.tools;
const response = await openai.responses.create({
  model: 'gpt-4.1',
  tools: tools,
  input: [{
    role: 'user',
    content: 'Upload a new video and publish to my followers'
  }],
});
const result = await composio.provider.handleToolCalls(
  'your-user-id',
  response.output
);
console.log(result);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and Claude Agent SDK
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
```

#### Path 2, Step 2: Create Tool Router Session

Initialize the Composio client and create a Tool Router session
```python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
```

```typescript
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: 'your-api-key' });

console.log("Creating Tool Router session...");
const { mcp } = await composio.create('your-user-id');
console.log(`Tool Router session created: ${mcp.url}`);
```

#### Path 2, Step 3: Connect to AI Agent

Use the MCP server with your AI agent
```python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Tiktok tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('List videos I uploaded this week on TikTok')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { openai } from '@ai-sdk/openai';
import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
import { generateText, stepCountIs } from 'ai';

const client = await createMCPClient({
  transport: {
    type: 'http',
    url: mcp.url,
    headers: { 'x-api-key': 'your-composio-api-key' }
  }
});

const tools = await client.tools();

const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  messages: [{ role: 'user', content: 'List videos I uploaded this week on TikTok' }],
  stopWhen: stepCountIs(5)
});

console.log(`Agent: ${text}`);
```

## Why Use Composio?

### 1. AI Native Tiktok Integration

- Supports both Tiktok MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable tool execution
- Rich coverage for reading, writing, and querying your Tiktok data

### 2. Managed Auth

- Built-in OAuth handling with automatic token refresh and rotation
- Central place to manage, scope, and revoke Tiktok access
- Per user and per environment credentials instead of hard-coded keys

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access Tiktok
- Scoped, least privilege access to Tiktok resources
- Full audit trail of agent actions to support review and compliance

## Use Tiktok with any AI Agent Framework

Choose a framework you want to connect Tiktok with:

- [ChatGPT](https://composio.dev/toolkits/tiktok/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/tiktok/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/tiktok/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/tiktok/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/tiktok/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/tiktok/framework/codex)
- [Cursor](https://composio.dev/toolkits/tiktok/framework/cursor)
- [VS Code](https://composio.dev/toolkits/tiktok/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/tiktok/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/tiktok/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/tiktok/framework/hermes-agent)
- [Google ADK](https://composio.dev/toolkits/tiktok/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/tiktok/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/tiktok/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/tiktok/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/tiktok/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/tiktok/framework/crew-ai)
- [Pydantic AI](https://composio.dev/toolkits/tiktok/framework/pydantic-ai)
- [AutoGen](https://composio.dev/toolkits/tiktok/framework/autogen)

## Related Toolkits

- [Twitter](https://composio.dev/toolkits/twitter) - Twitter is a social media platform for sharing real-time updates, conversations, and news. Stay connected, informed, and engaged with communities worldwide.
- [Instagram](https://composio.dev/toolkits/instagram) - Instagram is a social platform for sharing photos, videos, and stories with your audience. It helps brands and creators engage, grow, and analyze their online presence.
- [Ayrshare](https://composio.dev/toolkits/ayrshare) - Ayrshare is a Social Media API for managing, automating, and analyzing posts across multiple platforms. It helps you streamline social media workflows and centralize analytics.
- [Dotsimple](https://composio.dev/toolkits/dotsimple) - Dotsimple is a social media management platform for planning, creating, and publishing content. It helps teams boost their reach with AI-powered content generation and actionable analytics.
- [Strava](https://composio.dev/toolkits/strava) - Strava is a social fitness network and app for cyclists and runners. It's perfect for tracking workouts, sharing progress, and joining active communities.
- [Gmail](https://composio.dev/toolkits/gmail) - Gmail is Google's email service with powerful spam protection, search, and G Suite integration. It keeps your inbox organized and makes communication fast and reliable.
- [Google Calendar](https://composio.dev/toolkits/googlecalendar) - Google Calendar is a time management service for scheduling meetings, events, and reminders. It streamlines personal and team organization with integrated notifications and sharing options.
- [Google Drive](https://composio.dev/toolkits/googledrive) - Google Drive is a cloud storage platform for uploading, sharing, and collaborating on files. It's perfect for keeping your documents accessible and organized across devices.
- [Outlook](https://composio.dev/toolkits/outlook) - Outlook is Microsoft's email and calendaring platform for unified communications and scheduling. It helps users stay organized with powerful email, contacts, and calendar management.
- [Google Sheets](https://composio.dev/toolkits/googlesheets) - Google Sheets is a cloud-based spreadsheet tool for real-time collaboration and data analysis. It lets teams work together from anywhere, updating information instantly.
- [Supabase](https://composio.dev/toolkits/supabase) - Supabase is an open-source backend platform offering scalable Postgres databases, authentication, storage, and real-time APIs. It lets developers build modern apps without managing infrastructure.
- [Composio](https://composio.dev/toolkits/composio) - Composio is an integration platform that connects AI agents with hundreds of business tools. It streamlines authentication and lets you trigger actions across services—no custom code needed.
- [Notion](https://composio.dev/toolkits/notion) - Notion is a collaborative workspace for notes, docs, wikis, and tasks. It streamlines team knowledge, project tracking, and workflow customization in one place.
- [Slack](https://composio.dev/toolkits/slack) - Slack is a channel-based messaging platform for teams and organizations. It helps people collaborate in real time, share files, and connect all their tools in one place.
- [Airtable](https://composio.dev/toolkits/airtable) - Airtable combines the flexibility of spreadsheets with the power of a database for easy project and data management. Teams use Airtable to organize, track, and collaborate with custom views and automations.
- [Google Docs](https://composio.dev/toolkits/googledocs) - Google Docs is a cloud-based word processor that enables document creation and real-time collaboration. Its seamless sharing and version history make team editing and content management a breeze.
- [Google Super](https://composio.dev/toolkits/googlesuper) - Google Super is an all-in-one suite combining Gmail, Drive, Calendar, Sheets, Analytics, and more. It gives you a unified platform to manage your digital life, boosting productivity and organization.
- [Hubspot](https://composio.dev/toolkits/hubspot) - HubSpot is an all-in-one marketing, sales, and customer service platform. It lets teams nurture leads, automate outreach, and track every customer interaction in one place.
- [Codeinterpreter](https://composio.dev/toolkits/codeinterpreter) - Codeinterpreter is a Python-based coding environment with built-in data analysis and visualization. It lets you instantly run scripts, plot results, and prototype solutions inside supported platforms.
- [Gong](https://composio.dev/toolkits/gong) - Gong is a platform for video meetings, call recording, and team collaboration. It helps teams capture conversations, analyze calls, and turn insights into action.

## Frequently Asked Questions

### Do I need my own developer credentials to use Tiktok with Composio?

Yes, Tiktok requires you to configure your own OAuth credentials. Once set up, Composio handles token storage, refresh, and lifecycle management for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
