채널
TikTok
에이전트가 업리카로 틱톡에 올리는 방법. 틱톡이 요구하는 공개 범위 선택, 앱으로 보내는 초안, 그리고 Content Posting API 가 못 하는 것.
한눈에
| 이름 | 타입 | 설명 |
|---|---|---|
characters | text | 2,200 |
images | media | up to 35 per post; more than that and the first 35 go out with a warning |
carousel | media | 2-35 items |
video | media | 1 per post |
text alone | media | media required |
posts / 24h | limit | 8,640 |
deletes / 24h | limit | TikTok has no delete API; posts can only be removed in the app |
status | state | beta |
이 숫자는 서버가 검증에 쓰는 파일에서 그대로 옵니다. 틱톡에는 글만 올리는 것이 없고 영상과 사진을 섞지 못합니다. 본문 상한이 형식으로 갈립니다. 영상 2,200자, 사진 글 4,000자.
privacyLevel 이 왜 필수인가요?
틱톡 규정이 사람이 공개 범위를 직접 고르고 기본값이 없어야 한다고 요구합니다. 에이전트에게는 드롭다운이 없으니 그 요구를 인자로 옮겼습니다. options.tiktok.privacyLevel 은 필수이고 기본값이 없습니다. 고를 수 있는 값이 계정마다 달라서 먼저 get_publish_options 를 부르고 그 답에 있는 값을 넘깁니다.
첫 영상은 어떻게 올리나요?
영상을 올리고, 그 계정으로 get_publish_options 를 부른 뒤, 미디어 id 와 그 답의 privacyLevel 로 publish 를 부릅니다.
curl -X POST https://api.uplika.com/v1/posts \
-H "Authorization: Bearer $UPLIKA_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Caption #hashtags",
"accountIds": ["conn_..."],
"mediaIds": ["med_..."],
"options": { "tiktok": { "privacyLevel": "SELF_ONLY" } }
}'options.tiktok 이 받는 것
| 이름 | 타입 | 설명 |
|---|---|---|
privacyLevel | string | Required unless postMode is draft. One of the values that get_publish_options returns for this account, e.g. PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR or SELF_ONLY. The list differs per account, so do not hard-code it. |
title | string | Required for a photo post, up to 90 characters. A video post has no title field at all and passing one is rejected; a video's text comes from content. |
postMode | direct | draft | direct (default) posts to the profile. draft sends it to the creator's TikTok inbox; they open the notification and finish it in the app, choosing the visibility themselves. While this app awaits the Content Posting audit this is the only way to get something out publicly: a direct post can only be SELF_ONLY, but on this path we send no visibility at all. The trade is that it is not on the profile until the person finishes it, so there is no link and no metrics in the meantime. |
disableComment | boolean | Turn comments off for this post. Cannot be set to false if the creator disabled comments account-wide. |
disableDuet | boolean | Turn duets off for this post. Video posts only. |
disableStitch | boolean | Turn stitches off for this post. Video posts only. |
brandContentToggle | boolean | Declare paid partnership content ("Branded Content"). TikTok does not allow branded content to be private, so this cannot be combined with privacyLevel SELF_ONLY. |
brandOrganicToggle | boolean | Declare that the post promotes the creator's own brand ("Your Brand"). Leave it out rather than sending false: not declaring and declaring 'no' are different statements. |
isAigc | boolean | Declare that the content was generated by AI. Worth setting when you made the video or images. |
videoCoverTimestampMs | number | Which frame to use as the cover, in milliseconds into the video. TikTok does not accept a cover image file, only a timestamp. |
content | string | Text for this channel only. When set it replaces the shared content for this channel, and the length and media checks use it. Leave it out to use the shared content. |
서버가 검증에 쓰는 스키마에서 그대로 생성했습니다. GET /v1/platforms 도 같은 것을 줍니다.
안 되는 것은?
글 삭제와 댓글 읽기. Content Posting API 에 둘 다 없어서 delete_post 와 list_replies 는 되는 척하지 않고 코드로 거절합니다. 영상 글에는 제목 칸 자체가 없고 사진 글에만 있습니다. 커버는 파일이 아니라 영상 안의 시각입니다.
자주 묻는 것
공개 범위를 그냥 공개로 기본 두면 안 되나요?
틱톡 심사 규정이 기본값을 금지합니다. 사람이 골라야 합니다. 필수 인자가 그 규정을 지키는 방법입니다.
올린 글에 왜 링크가 없나요?
Content Posting 감사가 끝나기 전에는 틱톡이 API 업로드에 공개 id 를 주지 않습니다. 글은 계정에 비공개로 있습니다. 그동안 공개로 올리려면 postMode draft 를 쓰세요.
커버 이미지를 정할 수 있나요?
시각으로만요. options.tiktok.videoCoverTimestampMs 가 영상의 한 프레임을 고릅니다. 틱톡은 커버 파일을 받지 않습니다.