Quickstart
Build your first TokPortal API integration in 5 minutes. Step-by-step guide to create accounts and post videos programmatically.
Build your first TokPortal integration in 5 minutes.
Prefer a language SDK, the CLI or an AI agent? Everything is open source on GitHub at github.com/tokportal:
| Surface | Install | Repo |
|---|---|---|
| Node / TypeScript SDK | npm install @tokportal/node | tokportal-node |
| Python SDK | pip install tokportal | tokportal-python |
| Go SDK | go get github.com/tokportal/tokportal-go | tokportal-go |
| CLI | npm install -g @tokportal/cli | tokportal-cli |
| MCP server (Claude, Cursor, ChatGPT, VS Code…) | npx -y tokportal-mcp or remote https://app.tokportal.com/api/ext/mcp | tokportal-mcp · install guide |
| Examples | copy-paste scripts and workflows | examples |
Prerequisites
- A TokPortal account at app.tokportal.com
- Credits in your account (buy credits)
- An API key (generate one)
Step 1: Generate an API Key
Go to the Developer Portal and click Generate. Copy your key — it starts with sk_ and is shown only once.
Step 2: Verify Your Key
curl https://app.tokportal.com/api/ext/me \
-H "X-API-Key: sk_your_key_here"
You should see your profile and credit balance.
Step 3: Create a Bundle
curl -X POST https://app.tokportal.com/api/ext/bundles \
-H "X-API-Key: sk_your_key_here" \
-H "Idempotency-Key: first-bundle-v1" \
-H "Content-Type: application/json" \
-d '{
"bundle_type": "account_and_videos",
"platform": "tiktok",
"country": "USA",
"title": "My First Bundle",
"videos_quantity": 5
}'
This creates a TikTok account in the USA with 5 video slots. At the standard rate it costs 42 credits (32 for setup plus 5 x 2 video credits). The server calculates the workspace-effective price and can apply a contract_bundle_allowance. Read the returned credit_cost or call GET /credit-costs immediately before creation instead of hard-coding an amount.
Step 4: Configure the Account
curl -X PUT https://app.tokportal.com/api/ext/bundles/{bundle_id}/account \
-H "X-API-Key: sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"username": "mybrand",
"visible_name": "My Brand Official",
"biography": "Fashion and lifestyle content"
}'
Step 5: Configure Videos
Upload a video first, then configure:
# Get a presigned upload URL
# Do not add Idempotency-Key: this response contains a temporary signed URL.
curl -X POST https://app.tokportal.com/api/ext/upload/video \
-H "X-API-Key: sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{"filename": "video1.mp4", "content_type": "video/mp4", "bundle_id": "{bundle_id}"}'
# Upload the file (use the upload_url from the response)
curl -X PUT "{upload_url}" \
-H "Content-Type: video/mp4" \
--data-binary @video1.mp4
# Configure the video slot
curl -X PUT https://app.tokportal.com/api/ext/bundles/{bundle_id}/videos/1 \
-H "X-API-Key: sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"video_type": "video",
"description": "Check out this trend! #fashion",
"target_publish_date": "2026-09-01",
"video_url": "{public_url}"
}'
Or use batch configuration to set up multiple videos at once, or CSV import to import from a spreadsheet.
Step 6: Publish
curl -X POST https://app.tokportal.com/api/ext/bundles/{bundle_id}/publish \
-H "X-API-Key: sk_your_key_here"
Your bundle is now live. An account manager will be assigned and start working on it.
Step 7: Track Progress
curl https://app.tokportal.com/api/ext/bundles/{bundle_id} \
-H "X-API-Key: sk_your_key_here"
Monitor the status field on the bundle, account, and each video.
What's Next?
- SDKs & CLI — Node, Python, Go, CLI (GitHub)
- MCP Server — drive TokPortal from Claude, Cursor, ChatGPT, VS Code and other AI agents
- Create Bulk bundles for large-scale campaigns
- CSV Import for spreadsheet-based workflows
- Analytics to track account performance
- Accounts to manage delivered accounts and retrieve verification codes
Use TokPortal from your agent
All 25 agents × 12 jobsOne MCP server (or the REST API), the same 91 tools in every host. Pick yours for the exact connect snippet, the tool sequence per job and a prompt to paste.
Latest from the blog
All postsInstall the TokPortal Claude Code plugin, sign in with OAuth, and go from zero to a published bundle of geo-targeted TikTok accounts with scheduled videos.
Read 2026-08-18 · TokPortal teamn8n + TokPortal: 8 workflows for faceless channels, UGC seeding and ban alertsInstall the n8n-nodes-tokportal community node and copy eight workflows: Sheets → bundles, faceless channels, ban → Slack, analytics digest, credits guard.
Read 2026-08-18 · TokPortal teamTokPortal is now on the official MCP Registry, Docker MCP Catalog, Cline and more — how to install it in 15 agentsWhere the TokPortal MCP server is listed as of August 2026, what changed in tokportal-mcp 1.12.1, and the exact install snippet for 15 agent hosts.
Read 2026-08-18 · TokPortal teamWhy unified social APIs hit a wall at 25 posts/day — and what managed accounts changeThe official TikTok and Instagram publishing limits as documented in August 2026, why unified posting APIs inherit them, and what managed accounts change.
ReadRelease notes live in the changelog; the blog also has an RSS feed.