# TikTok inbox API

PubNio's TikTok inbox reads direct messages through TikTok's Business Messaging and comments on the account's videos. It syncs them from webhooks plus a pull every 6 hours and checks no reply window.

## What the inbox reads

| Channel | Read | Writes | Attachments | Sync |
| --- | --- | --- | --- | --- |
| Direct messages | [Yes](https://pubnio.com/docs/reference/inbox-conversations-list/) | [send](https://pubnio.com/docs/reference/inbox-messages-send/) | No | Webhook, re-read every 6 hours |
| Comments | [Yes](https://pubnio.com/docs/reference/inbox-comments-list/) | [reply](https://pubnio.com/docs/reference/inbox-comments-reply/), [hide, unhide](https://pubnio.com/docs/reference/inbox-comments-moderate/), [delete](https://pubnio.com/docs/reference/inbox-comments-delete/) | No | Webhook, re-read every 6 hours |
| Mentions | No | — | — | — |

- Both channels go through TikTok API for Business, so the account must be a TikTok business account. PubNio sends text messages and stores no attachment files: an image or video message keeps its kind, `media`, without the file.
- No mentions and no comment likes: PubNio's generated TikTok API for Business catalog has no endpoint for either, so the adapter answers `unsupported`.

## Reply window

Policy `none`: PubNio checks no reply window before it sends a TikTok message, and `replyWindow.open` is always true.

## Sync

Webhooks bring new items as they happen. Each channel is also re-read 6 hours after its last pull, to catch anything a webhook missed.

- TikTok registers one callback per developer app, not per account. PubNio requires `COMMENT` deliveries; `DIRECT_MESSAGE` deliveries are optional, because an app without Messaging access is refused them.

## Scopes

| Channel | Scopes |
| --- | --- |
| Direct messages | `message.list.read`, `message.list.send` |
| Comments | `comment.list`, `comment.create` |

Without a scope, reads keep working: the capabilities response lists it in `missingScopes` and drops send, reply, hide, like, and delete until the account reconnects with it. A write the channel lacks fails with HTTP 422 [capability-unsupported](https://pubnio.com/docs/problems/capability-unsupported/).

## Capabilities response

What [the inbox capabilities endpoint](https://pubnio.com/docs/reference/inbox-capabilities-get/) returns in `accounts[]` for a TikTok business account connected with every scope above. The other fields (`accountId`, `publishingReadiness`, `accountCapabilities`, `lastSyncError`, `deliveryGap`, `checkedAt`) are left out.

```json
{
  "provider": "tiktok",
  "accountKind": "social_account",
  "messaging": {
    "resource": "conversation",
    "supported": true,
    "operations": ["list", "read", "send"],
    "attachments": false,
    "quickReplies": false,
    "buttons": false,
    "readReceipts": false,
    "moderation": false,
    "syncMode": "webhook_with_reconciliation",
    "backfillDays": 30,
    "missingScopes": [],
    "missingTasks": [],
    "unavailable": null
  },
  "comments": {
    "resource": "comment_thread",
    "supported": true,
    "operations": ["list", "read", "reply", "hide", "unhide", "delete"],
    "attachments": false,
    "quickReplies": false,
    "buttons": false,
    "readReceipts": false,
    "moderation": true,
    "syncMode": "webhook_with_reconciliation",
    "backfillDays": 30,
    "missingScopes": [],
    "missingTasks": [],
    "unavailable": null
  },
  "mentions": {
    "resource": "mention",
    "supported": false,
    "operations": [],
    "attachments": false,
    "quickReplies": false,
    "buttons": false,
    "readReceipts": false,
    "moderation": false,
    "syncMode": "polling",
    "backfillDays": 0,
    "missingScopes": [],
    "missingTasks": [],
    "unavailable": null
  },
  "replyWindow": {
    "open": true,
    "policy": "none",
    "endsAt": null
  }
}
```

## Limits

- PubNio checks no reply window for TikTok messages. Any rule TikTok applies to a business's replies is enforced by TikTok, and its refusal comes back as a failed send.
- PubNio clears message, comment, and mention text 90 days after the network created it, and deletes stored attachments after 30 days.

## Related

- [TikTok publishing API](https://pubnio.com/platforms/tiktok)
- [TikTok MCP server](https://pubnio.com/tiktok-mcp)
- [TikTok OAuth scopes explained](https://pubnio.com/docs/providers/tiktok/scopes/)
- [TikTok API rate limits explained](https://pubnio.com/docs/providers/tiktok/limits/)
- [TikTok API error codes](https://pubnio.com/docs/errors/tiktok/)
- [Start an inbox sync](https://pubnio.com/docs/reference/inbox-sync-start/)
- [Inbox webhook events](https://pubnio.com/docs/webhook-events/)

