TikTokTikTokSocial

Publish a video to your TikTok profile

tiktok.tiktok.video.publish.init

Publish a video directly to your own TikTok profile

Price
freeAu prix du fournisseur
Success rate
—Aucune donnée de taux de réussite pour le momentAucune donnée de taux de réussite pour le moment
Latency p50
——
Last verified
—Not verified yet
POSThttps://toolswitch.dev/v1/tools/tiktok.tiktok.video.publish.initPreview
Try onlineBientôtProvider docs ↗
  • Uses platform quota
  • Synchronous response
  • Reads public data

Paramètres

needs the `post` capability (video.publish); a `draft` connection gets scope_not_authorized. Returns {data: {publish_id, upload_url}}. CHUNK RULES, which TikTok enforces strictly: a chunk is 5 MB to 64 MB, so a file <= 64 MB goes as ONE chunk of the whole size; larger files use 10 MB chunks with total_chunk_count = floor(size / chunk_size) and the LAST chunk carrying the remainder (it may exceed chunk_size). PUT each chunk straight to upload_url with plain curl or HTTP, NOT through treg: the URL carries its own permission and expires after 1 hour. Send Content-Type: video/mp4 (or video/quicktime, video/webm) and Content-Range: bytes start-end/total, e.g. curl -X PUT -H 'Content-Type: video/mp4' -H 'Content-Range: bytes 0-1304736/1304737' --data-binary @clip.mp4 "$UPLOAD_URL" — chunked PUTs answer 206, the last 201. Then poll tiktok.publish.status; publishing is not done when the upload finishes. UNTIL TIKTOK AUDITS TREG'S APP, this route is REFUSED (unaudited_client_can_only_post_to_private_accounts) unless privacy_level is SELF_ONLY and the creator's account is private; for any post others should see, use tiktok.tiktok.video.inbox.init instead

Cet outil n’a pas de paramètres. Voir la doc du fournisseur ↗ Provider docs

Exemples de code

Remplacez $TOOLSWITCH_KEY par la clé créée dans la console.

Preview
curl -X POST 'https://toolswitch.dev/v1/tools/tiktok.tiktok.video.publish.init' \
  -H "X-Toolswitch-Key: $TOOLSWITCH_KEY"

Cette API de passerelle est en préversion ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives. Les appels sont facturés à free, frais de service inclus.