InboxResource class

The inbox: comments, mentions, reviews and direct messages on connected accounts.

Every call needs the inbox scope. Reach it as client.inbox.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

accounts({String? workspaceId}) → Future<List<InboxAccount>>
Every active account, flagged with whether comments and DMs can be read for it.
approveReply(int approvalId, {String? text}) → Future<InboxDecision>
Sends a drafted reply, or text in its place.
conversations({String? workspaceId, String? platform, String? accountId, String? state, String? q, String? sort, int? page, int? perPage}) → Future<Page<InboxConversation>>
Returns one row per direct-message thread, latest first.
delete(String id) → Future<void>
Deletes a comment, or our own reply, on the platform as well as here.
editComment(String id, String text) → Future<InboxItem>
Edits our own comment on the platform to text.
handover(String conversationId, {required String accountId, String? appId, String? metadata}) → Future<InboxHandover>
Passes a Messenger thread to another Meta app, or takes it back when no appId is given. Also needs the publish scope.
hide(String id) → Future<InboxItem>
Hides a comment on the platform.
like(String id) → Future<InboxItem>
Likes an item on the platform. Needs the publish scope.
list({String? workspaceId, String? type, String? state, String? platform, String? accountId, String? postId, String? postExternalId, String? conversationId, String? direction, String? q, String? sort, int? page, int? perPage}) → Future<Page<InboxItem>>
Returns one page of items, newest first unless sort says otherwise.
listApprovals({String? workspaceId}) → Future<List<InboxApproval>>
Lists the replies an automation or the agent drafted that a person still has to send.
markThreadRead({required String workspaceId, required String accountId, String? postExternalId, String? conversationId}) → Future<int>
Marks a whole comment thread (postExternalId) or DM thread (conversationId) read. Returns how many items changed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pin(String id) → Future<InboxItem>
Pins our own comment on the platform. Needs the publish scope.
platforms() → Future<List<InboxPlatform>>
What the inbox supports on each network.
react(String id, String? reaction) → Future<InboxItem>
Reacts to a DM with reaction, an emoji of at most 32 characters, or removes ours when it is null. Needs the publish scope.
refresh({required String workspaceId}) → Future<InboxRefreshResult>
Polls every inbox-capable account in the workspace now.
rejectReply(int approvalId) → Future<InboxDecision>
Discards a drafted reply.
reply(String id, String? text, {List<String>? mediaIds, List<String>? quickReplies}) → Future<InboxReplyResult>
Sends text as a reply on the platform, as the connected account.
setTyping(String conversationId, {required String accountId, bool? on}) → Future<bool>
Shows the typing indicator in the DM thread conversationId, or clears it when on is false. Returns whether it is now on. Needs the publish scope.
startConversation({required String text, String? accountId, String? handle, String? commentId, List<String>? mediaIds}) → Future<InboxConversationStart>
Sends text as a new DM: to handle from accountId, or as a private reply to the inbox comment commentId. mediaIds are media library ids, at most 10. Needs the publish scope.
threads({String? workspaceId, String? kind, String? platform, String? accountId, String? state, String? q, String? sort, int? page, int? perPage}) → Future<Page<InboxThread>>
Returns one row per post with comments; pass kind: 'mentions' for the posts the account was tagged in, or kind: 'reviews' for one row per review left on the business.
toString() → String
A string representation of this object.
inherited
unhide(String id) → Future<InboxItem>
Shows a hidden comment again.
unlike(String id) → Future<InboxItem>
Removes the account's like. Needs the publish scope.
unpin(String id) → Future<InboxItem>
Unpins our own comment. Needs the publish scope.
unreadCount({String? workspaceId}) → Future<int>
How many items are unread.
update(String id, {required String state, DateTime? snoozedUntil}) → Future<InboxItem>
Moves an item to state, one of InboxItemState. A snoozed item resurfaces at snoozedUntil.
vote(String id, String direction) → Future<InboxItem>
Votes an item up or down where the network ranks by votes (Reddit), or takes an earlier vote back with none.

Operators

operator ==(Object other) → bool
The equality operator.
inherited