@openpromo/tiktok
v0.0.5
Published
Type-safe TypeScript SDK for the TikTok Business API — OAuth, video/photo publishing, comments, and account insights
Maintainers
Readme
@openpromo/tiktok
Type-safe TypeScript SDK for the TikTok Business API.
Powering openpromo.app — the AI-native social media workspace.
What
Fully typed TikTok Business API client generated from the official docs. OAuth, photo/video/carousel publishing, comments, insights, webhooks, and AI SDK tool integration — with runtime-agnostic fetch (Bun, Node, Deno, edge).
Install
bun add @openpromo/tiktok
# or
npm install @openpromo/tiktokUse
import { TikTok } from "@openpromo/tiktok";
const tiktok = TikTok.createClient({
accessToken: process.env.TIKTOK_TOKEN!,
businessId: "biz_123",
});
// Publish a video
await tiktok.content.publishVideo({
videoUrl: "https://cdn.example.com/clip.mp4",
caption: "New drop 🔥",
});
// AI SDK tools
import { createTikTokTools } from "@openpromo/tiktok/ai";
const tools = createTikTokTools({ accessToken: "...", businessId: "biz_123" });Features
- Typed Business API surface — generated from the official docs portal
- OAuth — token exchange, refresh
- Content publishing — video, photo, carousel, status polling
- Webhooks — Zod-validated payloads
- AI SDK tools — drop into any agent
- Runtime agnostic — native
fetch, no axios
Umbrella package
For a single install covering Meta + TikTok + Google Ads, use @openpromo/ad-platforms.
License
MIT © OpenPromo
