JSPM

@openpromo/tiktok

0.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q57018F
  • License MIT

Type-safe TypeScript SDK for the TikTok Business API — OAuth, video/photo publishing, comments, and account insights

Package Exports

  • @openpromo/tiktok
  • @openpromo/tiktok/ai

Readme

openpromo

@openpromo/tiktok

Type-safe TypeScript SDK for the TikTok Business API.

Powering openpromo.app — the AI-native social media workspace.

npm CI License


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/tiktok

Use

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