Automation API
Publish videos from any tool that can make an HTTPS request.
Authentication
Send your personal API key in the X-Token header. You'll find it under Dashboard → API.
X-Token: ap_your_api_key
Publish a video
Give either a public video_url that AutoPoster downloads, or upload the file as multipart form-data in the field video.
POST https://autoposter.rasulov.net/api/post
Content-Type: application/json
X-Token: ap_your_api_key
{
"video_url": "https://example.com/video.mp4",
"title": "Caption text #hashtag",
"privacy_level": "PUBLIC_TO_EVERYONE",
"disable_comment": false,
"disable_duet": false,
"disable_stitch": false
}
→ 200 { "ok": true, "publish_id": "v_pub_file~v2.123", "post_id": "…", "status_url": "https://autoposter.rasulov.net/api/status/v_pub_file~v2.123" }
curl -X POST https://autoposter.rasulov.net/api/post \
-H "X-Token: ap_your_api_key" \
-F "video=@clip.mp4" -F "title=Caption #hashtag" -F "privacy_level=SELF_ONLY"
Check status
Poll until status is PUBLISH_COMPLETE or FAILED.
GET https://autoposter.rasulov.net/api/status/:publish_id
X-Token: ap_your_api_key
→ 200 { "ok": true, "status": "PUBLISH_COMPLETE", "fail_reason": "", "publicaly_available_post_id": [ … ] }
Creator info
Returns the connected account's nickname and the privacy levels it allows.
GET https://autoposter.rasulov.net/api/creator
X-Token: ap_your_api_key
→ 200 { "ok": true, "creator_nickname": "…", "privacy_level_options": ["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","SELF_ONLY"], … }
Privacy levels
PUBLIC_TO_EVERYONE | Public |
MUTUAL_FOLLOW_FRIENDS | Friends |
FOLLOWER_OF_CREATOR | Followers |
SELF_ONLY | Only me |
Errors
Every error response has ok:false and a machine-readable error code.
401 unauthorized | X-Token missing or wrong |
409 not_connected | No TikTok account is connected. |
422 unaudited | TikTok has not approved AutoPoster's production access yet. Until then TikTok only allows posting to private accounts: in TikTok, open Settings and privacy → Privacy → Private account, then try again. |
429 rate_limit | TikTok's daily posting limit was reached. Try again later. |
502 tiktok_error | Upstream error, see message |