Skip to content

Function: paginateThread() ​

ts
function paginateThread(client, threadId): AsyncGenerator<{
[key: string]: unknown;
  item_id?: string;
  item_type?: string;
  text?: string;
  timestamp?: string;
  user_id?: string;
}>;

Walks every message in a thread, yielding one at a time across pages.

Parameters ​

ParameterType
clientPrivateClient
threadIdstring

Returns ​

AsyncGenerator<{ [key: string]: unknown; item_id?: string; item_type?: string; text?: string; timestamp?: string; user_id?: string; }>

MIT License. Not affiliated with, endorsed or sponsored by Meta or Instagram.