TikTokTikTokSocial

Publish a video to your TikTok profile

tiktok.tiktok.video.publish.init

Publish a video directly to your own TikTok profile

Price
freePelo preço do provedor
Success rate
—Ainda não há dados da taxa de sucessoAinda não há dados da taxa de sucesso
Latency p50
——
Last verified
—Not verified yet
POSThttps://toolswitch.dev/v1/tools/tiktok.tiktok.video.publish.initPreview
Try onlineEm breveProvider docs ↗
  • Uses platform quota
  • Synchronous response
  • Reads public data

Parâmetros

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

Esta ferramenta não tem parâmetros. Veja a documentação do provedor ↗ Provider docs

Exemplos de código

Substitua $TOOLSWITCH_KEY pela chave criada no console.

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

Esta API de gateway está em prévia; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra. As chamadas são cobradas a free, incluindo a taxa de serviço.