Skip to content
← Public packages

@kentcdodds/x

X API v2 helpers for tweets, search, legacy DMs, and encrypted X Chat via a Fly XDK sidecar.

src/list-chat-conversations.ts

20 lines · 820 B · TypeScript
import { listChatConversations } from './chat.ts'
import type { XListChatConversationsParams } from './types.ts'

/**
 * List encrypted X Chat conversations for the selected OAuth account.
 * Metadata only — no decrypt, no Fly sidecar, no PIN.
 *
 * Use `get-chat-conversation` to read plaintext for one thread.
 *
 * @returns Conversation ids, types, and participant ids from GET /2/chat/conversations.
 * @example
 * import listChatConversations from 'kody:@kentcdodds/x/list-chat-conversations'
 * const inbox = await listChatConversations({ maxResults: 5 })
 * // => { data: [{ id: '384666406-389681470', type: 'direct', participant_ids: ['...'] }] }
 */
export default async function listChatConversationsEntrypoint(
  params: XListChatConversationsParams = {},
) {
  return await listChatConversations(params)
}