TikTokTikTokSocial

Publish a video to your TikTok profile

tiktok.tiktok.video.publish.init

Publish a video directly to your own TikTok profile

Price
freeAl precio del proveedor
Success rate
—Aún no hay datos de tasa de éxitoAún no hay datos de tasa de éxito
Latency p50
——
Last verified
—Not verified yet
POSThttps://toolswitch.dev/v1/tools/tiktok.tiktok.video.publish.initPreview
Try onlinePróximamenteProvider 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 herramienta no tiene parámetros. Consulta la documentación del proveedor ↗ Provider docs

Ejemplos de código

Sustituye $TOOLSWITCH_KEY por la clave que creaste en la consola.

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

La API de la pasarela está en versión preliminar; su URL y autenticación pueden cambiar. Los parámetros del ejemplo son datos de muestra. Las llamadas se facturan a free, incluida la tarifa de servicio.