@promobase/tiktok-business-sdk
v0.0.4
Published
Type-safe TypeScript SDK for the TikTok Business API — OAuth, video/photo publishing, comments, and account insights
Maintainers
Readme
@promobase/tiktok-business-sdk
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 @promobase/tiktok-business-sdk
# or
npm install @promobase/tiktok-business-sdkUse
import { TikTok } from "@promobase/tiktok-business-sdk";
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 "@promobase/tiktok-business-sdk/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 @promobase/ad-platforms.
License
MIT © Promobase
