How to add TikTok comment replies and moderation to your SaaS
A SaaS adds TikTok comment replies and moderation through easyCoexistence's Partner API, which runs on its own app on TikTok's API for Business, so you pass no TikTok audit. Each customer's new comments reach your endpoint within about 5 minutes, and comment_received automations post public replies of up to 150 characters, fixed or written by AI, or hide the comment. Personal and Business accounts both connect.
easyCoexistence is social media infrastructure for AI agents: its Partner API connects your customers' WhatsApp, Instagram, Facebook and TikTok accounts to your product, with no app review on your side.
How soon TikTok fires comment.update after a comment is created, deleted or changes visibility on an owned post.
The longest reply an easyCoexistence automation posts on TikTok, fixed or AI; TikTok connections answer in public only.
Life of the TikTok token GET /channels/{id}?credentials=1 returns for your own calls; easyCoexistence renews it daily.
TikTok's status for a comment or reply hidden from public viewership, as its comment list endpoint reports it.
The TikTok account types your customers can connect through easyCoexistence's hosted sign-in.
How do a customer's TikTok comments reach your SaaS?
TikTok pushes them, and easyCoexistence passes them on. Once the customer connects through a connect session with channel set to tiktok, TikTok sends comment.update to easyCoexistence's app within about five minutes of a comment being created, deleted, hidden or made public on a photo post or public video, whether it was published through the API or in the TikTok app. PUT /channels/{id}/webhook forwards each event to your endpoint, signed with X-EC-Signature using the secret that call returns once.
The body carries platform, account_id, external_id and entry, which holds TikTok's event with comment_id, video_id and parent_comment_id as strings, so 64-bit IDs are not rounded. Replies arrive too, with comment_type reply, the account's own included. Forwards are sent once and never stored, so answer 2xx at once and queue the work. For anything else, GET /channels/{id}?credentials=1 returns a fresh TikTok token, renewed daily, for TikTok's own comment endpoints.
How do comment_received automations reply and moderate?
POST /channels/{id}/automations on the TikTok channel creates one, with a comment_received trigger that matches any comment or one with a keyword, up to 30 keywords matched as contains, starts_with or exact, on any video or on a single post_id. Automations act on new top-level comments and skip the account's own. reply_comment posts a fixed public reply, ai_reply posts one your model writes, call_webhook posts the reply your backend returns, and hide_comment hides the comment, while ai_decide or condition picks the path. Only one automation answers each comment, one set on that video first, then keyword ones, then the oldest, so a single automation that sorts comments and acts on each kind is the cleanest setup:
curl -X POST https://easycoexistence.com/api/v1/channels/$TIKTOK_CHANNEL_ID/automations \
-H "Authorization: Bearer $EC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "TikTok comments: answer questions, hide spam",
"trigger": { "type": "comment_received", "match": "any" },
"steps": [{
"type": "ai_decide",
"provider": "openai",
"model": "<MODEL_ID>",
"instructions": "Comments on Harbor Coffee videos. Praise, jokes and complaints stay up.",
"paths": [
{
"name": "Question",
"description": "Asks about prices, opening hours, locations or orders",
"steps": [{ "type": "ai_reply", "provider": "openai", "model": "<MODEL_ID>",
"prompt": "Answer as Harbor Coffee in one short, friendly sentence." }]
},
{
"name": "Spam",
"description": "Sells followers or likes, pushes another account or app, or announces a giveaway we did not run",
"steps": [{ "type": "hide_comment" }]
}
],
"otherwise": []
}]
}'What can a TikTok reply say, and where does it appear?
Under the comment, in public, since a TikTok connection has no DMs: TikTok's messaging API needs its own approval. Automation replies, fixed or AI, hold up to 150 characters. The API refuses a reply_comment text longer than that when you save it, and a reply that grows past it through {{name}} or {{message}}, or comes back long from your webhook, is cut at a word. ai_reply is told that its answer is public and limited to 150 characters, so it writes to fit.
The cap is the same whichever step writes the text: reply_comment, ai_reply or the reply your webhook returns, so a reply editor in your product should count to 150 for TikTok channels and show the limit as your customer types. TikTok itself warns that many near-identical comments posted in a short time can be flagged as spam and hidden, so a fixed reply under hundreds of comments is worth varying with {{first_name}} or replacing with ai_reply.
How does hiding a TikTok comment work?
hide_comment calls TikTok's comment hide endpoint with the HIDE action on the comment that started the run. The comment keeps its place on the video with the status HIDDEN, out of public view, and comment.update reports it as set_to_hidden, so your queue sees the change, as it does for comments hidden in the app or by TikTok's moderation. Your backend can show it again with UNHIDE through TikTok's API and the channel's token, although TikTok notes that an unhide may not take effect when moderation, privacy settings or its filters keep the comment hidden.
Because TikTok reports comments within about five minutes, a comment can be visible briefly before an automation hides it. The test endpoint reports that it would hide the comment and hides nothing, and the runs log shows the path each comment took, for 30 days.
How to set it up
- Connect the customer's TikTokPOST /connect-sessions with channel tiktok; the customer signs in with TikTok, on a Personal or Business account, and returns with a channel_id.
- Forward comments to your endpointPUT /channels/{id}/webhook with your URL, store the signing_secret it returns, and verify X-EC-Signature on each forward.
- Create the comment automationPOST /channels/{id}/automations with comment_received and the steps you need: reply_comment, ai_reply, call_webhook or hide_comment.
- Test with sample commentsRun spam, a question and a compliment through POST /automations/{id}/test; nothing is posted or hidden.
- Review the runsCheck GET /automations/{id}/runs for the path each comment took, and unhide anything hidden by mistake.
Common mistakes
- Saving a fixed reply over 150 characters. The API answers 400 invalid_request, so keep reply_comment short and leave room for {{name}} and {{message}}.
- Posting one identical reply under many comments. TikTok warns that bursts of near-identical comments can be flagged as spam and hidden; vary the wording or use ai_reply.
- Waiting for replies to replies to start an automation. Automations act on new top-level comments only and skip the account's own, so follow-ups in a thread go unanswered.
- Promising customers instant replies. TikTok reports a comment within about five minutes, so replies and hides land minutes later, not seconds.
easyCoexistence connects your customers' TikTok accounts through its own app on TikTok's API for Business, so neither you nor they need a developer app or audit, then forwards new comments to your endpoint and runs automations that reply in public or hide spam. Each account's access is renewed daily and checked every 6 hours. US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.
easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook, Google Business Profile and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.
Frequently asked questions
Do I need my own TikTok developer app or audit?
No. easyCoexistence connects through its own app on TikTok's API for Business, and your customers sign in with TikTok on the hosted page.
Can my SaaS send TikTok DMs or run comment-to-DM?
No. TikTok's messaging API needs its own approval, so on TikTok the conversation stays in the comments, where replies are public.
Can my backend call TikTok's comment API itself?
Yes. GET /channels/{id}?credentials=1 returns the account's business_id and a TikTok token that lasts 24 hours, so fetch it per job, then call endpoints such as business/comment/list/.
Does hiding a TikTok comment delete it?
No. It stays on the video with the status HIDDEN, out of public view, and an unhide brings it back unless TikTok's moderation keeps it hidden.
Keep reading
Connect your first channel in two minutes.
No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.
- 3 days free
- Cancel any time
- Official APIs only
- Monitored 24/7
Verified on