Description
n8n-nodes-tokportal



This is an n8n community node package for TokPortal.
TokPortal is the managed social infrastructure API: real TikTok and Instagram accounts created, warmed and operated by human account managers in 16+ countries — exposed as a REST API and an MCP server. No OAuth per account, no 25-posts/day cap, no app review.
The package ships two nodes:
- TokPortal — an action node covering bundles (missions), videos, delivered accounts, media, credits, webhook endpoints, analytics, Advanced Niche Warming and workspace helpers (52 operations, declarative/routing style, usable as an AI Agent tool).
- TokPortal Trigger — a webhook trigger that registers a signed TokPortal webhook endpoint when the workflow is activated and starts the workflow on the events you pick (account delivered, video posted, account banned, warming completed, subscription changes, …).
Installation · Credentials · Operations · Trigger · Templates · MCP alternative · Resources · Support
Installation
n8n Cloud and self-hosted (GUI)
1. Open Settings → Community Nodes.
2. Click Install, enter n8n-nodes-tokportal and confirm.
3. The TokPortal and TokPortal Trigger nodes appear in the nodes panel.
Self-hosted (CLI / Docker)
inside your n8n user folder (~/.n8n by default)
cd ~/.n8n && mkdir -p nodes && cd nodes
npm install n8n-nodes-tokportal
restart n8n
Or set N8NCOMMUNITYPACKAGES=n8n-nodes-tokportal for a Docker install. See the n8n community nodes documentation for details.
Requirements: n8n ≥ 1.0 (Node.js ≥ 20.15). No runtime dependencies.
Credentials
Create a TokPortal API credential with your API key:
1. Sign in to app.tokportal.com → Developer → API keys → create a key (starts with sk_; shown once).
2. In n8n: Credentials → New → TokPortal API, paste the key and click Save. n8n tests it against GET /me.
Every request is sent with X-API-Key: sk_... and X-TokPortal-Client: n8n-nodes-tokportal/ to https://app.tokportal.com/api/ext. The same credential can be selected in n8n’s HTTP Request node (Authentication → Predefined Credential Type → TokPortal API) for endpoints not covered here.
Operations
All operations return the TokPortal data object(s) as n8n items. Mutations that add metadata (for example creditscharged on bundle creation) keep it under meta. List operations expose Return All (auto-pagination) and Limit.
| Resource | Operations |
| — | — |
| Bundle | Create, Create Many (Bulk), Get, Get Many, Update, Publish, Unpublish, Get Publish Readiness, Configure Account, Get Account, List Videos, Publish All Videos |
| Video | Configure (video / carousel / story by position), Batch Configure (JSON array), Get, Patch (metadata & schedule), Publish, Unschedule, Reset |
| Account | Get, Get Many, List Bans (appeal lifecycle & resolutions), List Bundles, Get Analytics, List Video Analytics, Reveal Credentials, Retrieve Verification Code |
| Media | Create Video Upload URL (presigned), Create Image Upload URL (presigned), Upload Image From URL |
| Credit | Get Balance, Get Costs, List Transactions |
| Webhook Endpoint | Create, Get, Get Many, Delete, Test, List Deliveries, List Event Types |
| Analytics | Get Dashboard, Get Time Series, Get Account Drilldown, Get Video Analytics |
| Warming | Generate Terms (free), Configure Bundle Terms, Rewarm Account, List Account Sessions, Get Session |
| Workspace | Get Current User, List Countries, List Platforms |
Notes and gotchas:
.mp4) or a TokPortal storage URL. To upload a file from n8n, use Media → Create Video Upload URL, PUT the binary to uploadurl with an HTTP Request node, then pass publicurl as Video URL (template 06 shows the full flow). Direct multipart upload (POST /upload/video/direct) is not wrapped by this node — call it with the HTTP Request node and the same credential (Body → Form-Data, file + bundle_id).error.details.policy_version on the first call; run the operation again with Acknowledge Support Forfeit enabled and that exact Policy Version. Template 07 wires this behind a manual approval. Never post revealed secrets to chat tools.{{ $json.terms }}.ADVANCEDWARMINGFLAGREQUIRED (nothing is charged). Send the terms or the count, not two quantities that disagree, and keep the terms distinct — a duplicate fails the call with ADVANCEDWARMINGTERMSREJECTED instead of silently reducing what you buy.tiktok and instagram. YouTube channels are delivered through the TokPortal dashboard and then usable through the account and video operations.Idempotency-Key; the node never sends one.The node is marked usableAsTool, so it can be attached to n8n’s AI Agent node as a tool.
TokPortal Trigger
Add TokPortal Trigger, pick the credential and the events you want:
webhook.test, bundle.created, bundle.published, bundle.cancelled, bundle.archived, account.configured, account.published, account.inreview, account.pendingcorrections, account.finalized, account.remade, account.banned, account.banappeal.submitted, account.banappeal.resolved, account.banresolution.decided, account.revealed, video.configured, video.inreview, video.published, video.pendingcorrections, video.finalized, warming.sessionstarted, warming.termverified, warming.sessioncompleted, subscription.renewed, subscription.lapsed, subscription.cancelled, subscription.reactivated, subscription.ended, credits.restored.
How it works:
POST /webhooks with the n8n webhook URL and your events, and stores the endpoint ID and the one-time signing_secret in the workflow’s static data (never in the credential).DELETE /webhooks/{id}.TokPortal-Signature header (t=<unixts>,v1=, HMAC-SHA256 of ".<rawbody>" with the signing secret, 300 s tolerance by default, constant-time comparison) and rejects invalid requests with 401. Signature verification and tolerance are configurable under Options.id, type, apiversion, createdat, data) plus headers.eventid / headers.eventtype. Use id (or headers.event_id) as your idempotency key: retries keep the same event ID.If you subscribe at minimum to account.banned, bundle.cancelled and account.remade, you get the push signals that a managed account was banned, that a bundle will no longer accept publishes, and that an account was rebuilt (same bundle_id, new saved account).
Testing tip: with Listen for test event active, use Webhook Endpoint → Test (or the dashboard “Send test”) to send a signed webhook.test delivery.
Workflow templates
Eight importable workflows live in templates/ — see templates/README.md for setup steps and the Creator Hub descriptions:
1. Google Sheet → TokPortal bundles (bulk account creation)
2. Faceless channel factory (Schedule → render → configure → publish)
3. TokPortal ban → Slack alert (trigger)
4. Daily analytics digest → Slack
5. Airtable UGC queue → TokPortal videos
6. Sora/Veo output URL → TokPortal upload + schedule
7. New account delivered → notify + reveal step (manual approval)
8. Credits balance guard → top-up reminder
Import them from Workflows → Import from File (or paste the JSON), then select your credentials.
Alternative: MCP Client node
If you prefer to let an AI agent drive TokPortal, use n8n’s MCP Client Tool node against the hosted TokPortal MCP server (same 90+ tools as the API):
https://app.tokportal.com/api/ext/mcp (Streamable HTTP)Authorization: Bearer sk... (or X-API-Key: sk...)Docs: developers.tokportal.com/mcp.
Compatibility
Built and linted with @n8n/node-cli (declarative node, n8nNodesApiVersion: 1). Tested against n8n-workflow 2.x. Node.js ≥ 20.15.
Development
npm install --ignore-scripts
npm run build # tsc + static assets → dist/
npm run lint # n8n community node linter
npm test # loads dist/, checks every resource/operation, signature verification, templates