tiktok
Installation
SKILL.md
Call the TikTok API v2 with curl + jq. The user's OAuth bearer token is in
$TIKTOK_TOKEN; every call needs Authorization: Bearer $TIKTOK_TOKEN. Base
URL: https://open.tiktokapis.com/v2.
T="https://open.tiktokapis.com/v2"; AUTH="Authorization: Bearer $TIKTOK_TOKEN"
Responses wrap everything in {"data":…,"error":{"code","message","log_id"}}.
Check error.code, not just the HTTP status — several real failures
(spam_risk_too_many_posts, spam_risk_user_banned_from_posting,
reached_active_user_cap) come back as HTTP 200 with a non-ok code. Show
error.message verbatim. 401 / access_token_invalid = re-connect TikTok.