# YouTube inbox API

PubNio's YouTube inbox reads comment threads on every video of the channel. It syncs them by polling every 15 minutes and checks no reply window (provider rules checked 2026-12-05).

## What the inbox reads

| Channel | Read | Writes | Attachments | Sync |
| --- | --- | --- | --- | --- |
| Direct messages | No | — | — | — |
| Comments | [Yes](https://pubnio.com/docs/reference/inbox-comments-list/) | [reply](https://pubnio.com/docs/reference/inbox-comments-reply/), [delete](https://pubnio.com/docs/reference/inbox-comments-delete/) | No | Polled every 15 minutes |
| Mentions | No | — | — | — |

- PubNio reads `commentThreads.list` with `allThreadsRelatedToChannelId`, which covers every video on the channel, newest first, up to 100 threads a page, with the replies YouTube includes in each thread.
- Comments only: the YouTube adapter answers direct messages, mentions, and attachments with `unsupported`.
- Delete works only on comments the channel wrote itself. YouTube's `comments.delete` reference, read 2026-12-05: "Only the comment's author can call this method to delete a comment." Deleting someone else's comment fails with HTTP 409 `conflict`, and the comment stays.

## Reply window

Policy `none`: there are no YouTube direct messages to send, and replies to comments have no window.

## Sync

No webhooks: each channel is pulled again 15 minutes after its last pull. [Starting an inbox sync](https://pubnio.com/docs/reference/inbox-sync-start/) queues a pull of every channel now.

- Each page of comment threads costs 1 quota unit; a reply costs 50 (`comments.insert`) and a delete 50 (`comments.delete`). A project's default allowance is 10,000 units a day, reset at midnight Pacific Time.

## Scopes

| Channel | Scopes |
| --- | --- |
| Comments | `https://www.googleapis.com/auth/youtube.force-ssl` |

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/).

- `youtube.force-ssl` is Google's scope to see, edit, and delete YouTube videos, ratings, comments, and captions.

## Capabilities response

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

```json
{
  "provider": "youtube",
  "accountKind": "social_channel",
  "messaging": {
    "resource": "conversation",
    "supported": false,
    "operations": [],
    "attachments": false,
    "quickReplies": false,
    "buttons": false,
    "readReceipts": false,
    "moderation": false,
    "syncMode": "polling",
    "backfillDays": 0,
    "missingScopes": [],
    "missingTasks": [],
    "unavailable": null
  },
  "comments": {
    "resource": "comment_thread",
    "supported": true,
    "operations": ["list", "read", "reply", "delete"],
    "attachments": false,
    "quickReplies": false,
    "buttons": false,
    "readReceipts": false,
    "moderation": false,
    "syncMode": "polling",
    "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 cannot remove other people's comments. The same reference, read 2026-12-05: "Channel owners and moderators can hide unwanted comments by calling comments.setModerationStatus with moderationStatus set to rejected." PubNio does not call `comments.setModerationStatus`: `moderation` is false, and hide answers `unsupported`.
- PubNio clears message, comment, and mention text 90 days after the network created it, and deletes stored attachments after 30 days.

## Sources

- [YouTube Data API: CommentThreads: list](https://developers.google.com/youtube/v3/docs/commentThreads/list), read 2026-12-05
- [YouTube Data API: Comments: delete](https://developers.google.com/youtube/v3/docs/comments/delete), read 2026-12-05
- [YouTube Data API: Quota Calculator](https://developers.google.com/youtube/v3/determine_quota_cost), read 2026-12-05
- [OAuth 2.0 Scopes for Google APIs](https://developers.google.com/identity/protocols/oauth2/scopes), read 2026-12-05

## Related

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

