Skip to content

TikTok

Genium currently uses TikTok Inbox Upload by default. The creator receives a TikTok notification and completes editing and publishing inside TikTok.

Connect

bash
curl -X POST https://auth.genium.one/api/social/connect-ticket \
  -H "Authorization: Bearer $USER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider":"tiktok"}'

Open the returned connect_url. To inspect the OAuth redirect:

bash
curl -i "https://auth.genium.one/connect/tiktok?ticket=<ticket>"

Tickets expire after ten minutes, can start OAuth once, and map the connected account to the authenticated Genium user.

Upload a video

bash
curl -X POST https://auth.genium.one/api/tiktok/upload \
  -H "Authorization: Bearer $USER_API_KEY" \
  -F "video=@video.mp4;type=video/mp4" \
  -F "title=Video title" \
  -F "caption=Video caption #hashtag"

Genium stores title and caption, but Inbox Upload requires the creator to complete the caption in TikTok. Direct Post remains available internally with mode=direct after the TikTok app is audited for video.publish.

Raw video/* request bodies remain supported with X-Title and X-Caption. To retry an existing R2 object without uploading the local file again, use the JSON media_key form.

Upload photos

Repeat the photos field for a carousel of up to 35 images:

bash
curl -X POST https://auth.genium.one/api/tiktok/upload/photo \
  -H "Authorization: Bearer $USER_API_KEY" \
  -F "title=Photo title" \
  -F "description=Photo description #hashtag" \
  -F "cover_index=0" \
  -F "photos=@photo-1.jpg;type=image/jpeg" \
  -F "photos=@photo-2.jpg;type=image/jpeg"

TikTok must verify this media URL prefix before pulling photos:

text
https://media.genium.one/

Status

bash
curl "https://auth.genium.one/api/tiktok/status?publish_id=PUBLISH_ID" \
  -H "Authorization: Bearer $USER_API_KEY"

SEND_TO_USER_INBOX means TikTok notified the creator. When status becomes SEND_TO_USER_INBOX or PUBLISH_COMPLETE, Genium deletes associated temporary R2 objects and marks their media rows DELETED. Failed uploads remain READY for retry; R2 lifecycle cleanup is the fallback for abandoned media.

Genium Social Hub