Loading...
Loading...
Upload videos to the user's TikTok inbox/drafts and read their TikTok profile via the Content Posting API. Use when the user wants to publish or post a generated video to TikTok, send a video to their TikTok drafts, or check their TikTok account.
npx skill4agent add acedatacloud/skills tiktokcurl + jq$TIKTOK_TOKENAuthorization: Bearer $TIKTOK_TOKENhttps://open.tiktokapis.com/v2{"data":...,"error":{"code","message","log_id"}}error.code == "ok"error.message401access_token_invalidT="https://open.tiktokapis.com/v2"; AUTH="Authorization: Bearer $TIKTOK_TOKEN"
# Profile (account card)
curl -sS -H "$AUTH" "$T/user/info/?fields=open_id,display_name,avatar_url" \
| jq '.data.user'PULL_FROM_URLcdn.acedata.cloudVIDEO_URL="https://cdn.acedata.cloud/...mp4" # must be on a verified domain
curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" -d "$(jq -n --arg u "$VIDEO_URL" \
'{source_info:{source:"PULL_FROM_URL", video_url:$u}}')" \
"$T/post/publish/inbox/video/init/" | jq '{publish_id: .data.publish_id, error}'curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d '{"publish_id":"PUBLISH_ID"}' "$T/post/publish/status/fetch/" \
| jq '.data | {status, fail_reason}'video.publishcreator_info/post/publish/video/init/PULL_FROM_URLFILE_UPLOADSELF_ONLY