TikTok comment webhook events
TikTok's API for Business sends a comment.update webhook within five minutes of a comment or reply being created, deleted, hidden, set to friends only or made public on an account's photo posts and public videos. Each event names the comment, the post, the action, the commenter's identifier and the text, and is signed with a Tiktok-Signature header.
easyCoexistence forwards each TikTok comment event for the account to your HTTPS endpoint as it arrives, signed with a secret for that account and with no copy kept.
Time within which comment.update fires after a comment or reply is created, deleted or changes visibility.
How long TikTok retries a delivery its callback did not answer with HTTP 200, backing off exponentially.
Scope the account must have granted, and kept valid, for its comment.update events to be sent.
TikTok's delivery promise, so the same event can arrive more than once and handling should be idempotent.
What does comment.update report?
Changes to comments on the account's photo posts and public video posts, whether they were published through the API or in the TikTok app. comment_action says what happened:
- insert: a comment or reply was created.
- delete: it was deleted.
set_to_hidden: it was hidden, by a user or through moderation.set_to_friends_only: it was set to visible to friends only.set_to_public: it went from hidden or friends only to visible to everyone.
What does an event carry?
TikTok posts JSON with client_key, event, create_time, user_openid, which is the account's ID, and content, a serialized JSON string. Inside content: comment_id and video_id, parent_comment_id for replies, comment_type (comment or reply), comment_action, a timestamp, the commenter's unique_identifier and the text. The IDs are JSON numbers too large for a double to hold exactly, so read them from the raw string.
How do events reach your endpoint?
TikTok sends webhooks to the developer app, through one callback URL for the whole app. easyCoexistence receives them and passes each comment.update for a connected account on to the HTTPS endpoint you set for it, once, as it arrives, signed with that account's own secret. Set the endpoint with set_social_webhook_destination from Claude or ChatGPT, or with the Partner API through PUT /channels/:id/webhook; the secret is shown once, and a null URL turns forwarding off.
What does a forwarded event look like?
A POST with the platform, the account_id that list_social_accounts gives the connection, the account's external_id, which is TikTok's open_id, and entry: the event's name, create_time and content, with content already parsed and its IDs turned into strings so none are rounded.
{
"platform": "tiktok",
"account_id": "<ACCOUNT_ID>",
"external_id": "<TIKTOK_OPEN_ID>",
"entry": {
"event": "comment.update",
"create_time": 1793318400,
"content": {
"comment_id": "<COMMENT_ID>",
"video_id": "<VIDEO_ID>",
"parent_comment_id": null,
"comment_type": "comment",
"comment_action": "insert",
"timestamp": 1793318399000,
"unique_identifier": "<UNIQUE_IDENTIFIER>",
"text": "<COMMENT_TEXT>"
}
}
}How do you verify a forwarded event?
Each forwarded delivery carries an X-EC-Signature header, t=<unix>,v1=<hex>, in which v1 is an HMAC-SHA256 of the timestamp, a dot and the raw body, keyed with the account's signing secret. Recompute it over the body exactly as it arrived, compare the two in constant time, and refuse a timestamp more than 5 minutes old.
Is a delivery retried?
Not by easyCoexistence. Each event is forwarded once, in memory, with no copy kept to retry from; the forward waits 8 seconds for an answer and does not follow redirects. Upstream, TikTok retries its own deliveries for up to 72 hours and promises at least one, so the same event can reach you twice: deduplicate on comment_id together with comment_action.
Common mistakes
- Parsing the IDs as numbers. comment_id and video_id are larger than a double holds exactly; easyCoexistence forwards them as strings, so keep them that way.
- Computing the signature over a parsed copy of the body. The HMAC covers the raw body as delivered, and re-serializing it breaks the match.
- Handling a repeated event twice. TikTok delivers at least once, so key on comment_id and comment_action before acting.
- Pointing the destination at an address that redirects. Forwarding does not follow redirects, so give the final HTTPS URL.
Turn it on with set_social_webhook_destination from Claude or ChatGPT, or with the Partner API. 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 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
Which TikTok webhook events are forwarded?
comment.update, for comments and replies on the connected account's posts: created, deleted, hidden, set to friends only or made public.
Are TikTok publishing events forwarded too?
No. Forwarding carries comment events; follow a post's publishing with get_tiktok_publish_status instead.
How quickly does a TikTok comment event arrive?
TikTok sends comment.update within five minutes of the change, and easyCoexistence passes it on as soon as it comes in.
Does a TikTok comment event include the text?
TikTok documents a text field in the event's content, beside the comment and post IDs, the action and the commenter's unique_identifier.
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