Comments
Moderate the comments on your customer's own posts: read them, reply, hide the ones that should not be seen, and delete.
Reads come from Adeli's copy; writes go to the platform. Adeli keeps each
connected account's recent posts and their comments, so listing comments
answers immediately instead of waiting on the platform. The copy is refreshed
from the platform in the background whenever it is read and is more than a
minute old (ten minutes on YouTube, whose quota is shared by every Adeli
customer), and Adeli updates it as soon as you reply, hide, like, or delete
through this API. Every response says when its comments were last refreshed
(syncedAt) and whether every thread is held yet (complete). Changes made
outside Adeli, such as a comment hidden in the Instagram app, appear after the
next refresh.
The four platforms do not allow the same things:
| TikTok | YouTube | |||
|---|---|---|---|---|
| List comments and replies | Yes | Yes | Yes, paged with cursor | Yes, paged with cursor |
| Reply to a comment | Yes | Yes | Yes | Yes |
| Comment on the account's own post | No | Yes | Yes | Yes |
| Hide and unhide | Yes | Yes | Yes | Yes, by holding for review |
| Like and unlike | No | No | Yes | No |
| Delete | Any comment on the account's posts | Any comment on the Page's posts | Only comments the account wrote | The channel's own; anyone else's is rejected, optionally banning its author |
Comment ids and post ids are the provider's own: numeric strings everywhere but
YouTube, whose ids are URL-safe base64 (a reply's is {parent}.{reply}). Post ids
come from GET /api/v1/posts (providerId), or from the
posts that List comments returns.
Endpoints
/api/v1/commentsAn account's recent posts and the comments on one of them.POSTReply or comment/api/v1/commentsReply to a comment, or comment on one of the account's own posts.PATCHHide or like comment/api/v1/comments/{commentId}Hide, unhide, like, or unlike a comment.DELETEDelete comment/api/v1/comments/{commentId}Delete a comment.Permissions
Comment management needs a permission that connections made before it was
requested may lack. A read or write against such a connection returns
422 connection_expired; reconnecting the account and
approving the permission fixes it. On TikTok, reading needs comment.list and
writing needs comment.list.manage. On YouTube, both need
youtube.force-ssl, which every YouTube connection holds.
YouTube quota
YouTube's API quota belongs to Adeli's Google Cloud project and is shared by
every connected channel: 10,000 units a day by default, reset at midnight
Pacific. A read costs 1 unit; every reply, comment, hide, and delete costs 50.
Once the day's quota is spent, YouTube calls return 429 quota_exhausted with
the reset time, and reads keep answering from Adeli's copy.