marketing
TikTok CLI for Headless Automation
Use the TikTok CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write Bearer token auth
TikTok CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The TikTok CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# TikTok CLI for Headless Automation
kosmokrator integrations:configure tiktok --set access_token="$TIKTOK_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call tiktok.tiktok_list_videos '{"advertiser_id":"example_advertiser_id","page":1,"page_size":1}' --json Discovery Before Execution
Agents and scripts can inspect TikTok docs and schemas before choosing a function.
kosmo integrations:docs tiktok --json
kosmo integrations:docs tiktok.tiktok_list_videos --json
kosmo integrations:schema tiktok.tiktok_list_videos --json
kosmo integrations:search "TikTok" --json
kosmo integrations:list --json Useful TikTok CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
tiktok.tiktok_list_videos | Read | advertiser_id, page, page_size | List videos available for an advertiser in TikTok Business. Returns video IDs, names, and metadata. |
tiktok.tiktok_get_video | Read | advertiser_id, video_id | Get details for a specific TikTok video, including preview URL, duration, and status. |
tiktok.tiktok_upload_video | Write | advertiser_id, video_url, file_name | Upload a video to TikTok via URL for use in advertising campaigns. |
tiktok.tiktok_list_campaigns | Read | advertiser_id, page, page_size | List advertising campaigns for a TikTok advertiser. Returns campaign IDs, names, status, and budgets. |
tiktok.tiktok_get_campaign | Read | advertiser_id, campaign_id | Get details for a specific TikTok advertising campaign, including budget, schedule, and performance. |
tiktok.tiktok_list_advertisers | Read | app_id, secret | List advertisers accessible to the authenticated TikTok Business user. Returns advertiser IDs, names, and company details. |
tiktok.tiktok_get_current_user | Read | none | Get the authenticated user's TikTok Business account information, including display name, email, and status. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.